performance Questions

5

Solved

Just like the question says. Is there a faster way to do what is done below when the vector size is very large (> 10M entries) using base R? The code below works, but when the vector size ...
Disreputable asked 25/10 at 13:16

2

Why does t(mat1) %*% mat2 work quicker than crossprod(mat1, mat2). Isn't the whole point of the latter that it calls a more efficient low-level routine? r$> mat1 <- array(rnorm(100 * 600), di...
Jessejessee asked 3/10 at 5:24

3

I need to create a simple tooltip library that works like this: every DOM element with a specific attribute combination (like class="tooltip", data-tooltip-text="some text") automatically displays...
Openminded asked 7/3, 2019 at 14:24

3

Solved

Suppose there are many binary strings x <- c("0100100010101010", "0100110010101010","0111001000","010111") I am looking for a fast method in R to output...
Franciskus asked 2/10 at 7:5

1

Exploring the Oxygen package to build APIs I found this I haven't been able to solve When I run this API (with a 150 ms sleep to simulate the time taken by a model): using Oxygen @get "/mod...
Risible asked 1/3 at 19:36

2

I need to reduce the memory used by my native Windows C++ application, without compromising its performances. My main data structure is composed by several thousands of instances, dynamically allo...
Pameliapamelina asked 21/10, 2016 at 7:12

7

Solved

The fringe of a binary tree is the sequence composed by its leaves, from left to right. The same-fringe problem [Hewitt & Patterson, 1970] consists of determining whether two binary trees have ...
Sefton asked 15/6 at 15:38

3

Solved

I've wrote my code for Longest Common Prefix in LeetCode, but it was returned "Time Limit Exceeded". There is no specific error message, so I have no idea how to fix my code to pass test cases. c...
Moon asked 14/9, 2019 at 1:50

7

Solved

I have a list of things. Is there any difference between list.Count > 0 and list.Count != 0? Or any performance difference in these codes? if (list.Count > 0) // do some stuff if (list.Cou...
Laundry asked 10/10, 2015 at 5:15

1

I have a problem with Kotlin files in android studio. when the file is too large (for example more than 2000 lines), the android studio is not responding and actually, it freezes when I try to work...
Karlykarlyn asked 29/6, 2019 at 18:47

2

We're creating a heavy-load network-traffic-centric application and run those server quite successful for many, many years under Java 8. Network-traffic-centric means that quite often the server ha...
Polis asked 29/8 at 11:43

2

Solved

I'll start this question from notion that I've seen a similar question on StackOverflow, but that question had only answer for the difference. What I'm asking is what should I use depending on sit...

8

Previous in I have used ctr+d for duplicating the code many times, but when I switched to desktop and installed vs code and all the necessary extensions for my react project. And now this CTRL+D ke...
Greatcoat asked 26/11, 2021 at 6:11

3

Solved

GAS is quite powerful and you could write a full fledged web-app using a Google Sheet as the DB back-end. There are many reasons not to do this but I figure in some cases it is okay. I think the bi...

3

I know micro-benchmarking is hard. I'm not trying to build a poor micro-benchmark. Rather, I have run into this problem when making (what I thought to be) harmless refactoring. There is stripped do...
Branch asked 14/11, 2019 at 22:54

4

Solved

Consider this: a = array(1:60, c(3,4,5)) # Extract (*,2,2)^th elements a[cbind(1:3,2,2)] # ^^ returns a vector of length 3, c(16, 17, 18) # Note this is asymptotically inefficient -- cbind(1:k,2...
Browse asked 19/8 at 9:29

4

I have a matrix which would be a matrix of factors if R supported them. I want to print the matrix with the factor names, rather than integers, for readability. Using indexing loses the matrix stru...
Retreat asked 18/8 at 20:55

7

Solved

I have an array of points in unknown dimensional space, such as: data=numpy.array( [[ 115, 241, 314], [ 153, 413, 144], [ 535, 2986, 41445]]) and I would like to find the average euclidean dista...
Phosphorite asked 5/3, 2010 at 0:3

7

Solved

I'm performing a regular expression match on a column of type character varying(256) in PostgreSQL 8.3.3. The column currently has no indices. I'd like to improve the performance of this query if I...
Saadi asked 30/3, 2009 at 20:56

4

Solved

I'm working with DataTable's and I need to convert them to a CSV file format. Most of the tables I am working with have over 50,000 records so I'm trying to minimize the time it takes to convert th...
Highams asked 13/2, 2015 at 15:51

2

I'm trying to profile an application written in go which apparently uses about 256 virtual memory (checked using ps aux). I'm trying to use pprof package and see what functions allocate/consume mos...
Minaret asked 18/8, 2015 at 16:42

1

Solved

The following is a question about the performance of the ABAP TRY/CATCH construct. In particular, it is not about throwing or catching exceptions. Is there a performance cost when entering TRY/CATC...
Regazzi asked 13/2, 2023 at 12:17

4

Solved

I have tried to google for answers to this, but perhaps there isn't widely available research or perhaps I'm not using the right terms. Basically, I would like to have some idea as to the average ...
Emigrate asked 4/11, 2010 at 16:9

3

Solved

I want to know difference between Using index condition and Using where; Using index. I think both method use index to fetch first result record set, and filter using WHERE condition. Q1. What's t...
Lezley asked 27/2, 2015 at 7:20

6

Solved

Let's say I have two variables: >>> a = "hello" >>> b = "world" I can concatenate them in two ways; using +: >>> a + b "helloworld" Or using an f-string: >>&...
Bula asked 4/12, 2019 at 16:29

© 2022 - 2024 — McMap. All rights reserved.