Data dodania Pytanie
2017-01-01 20:01 How to optimize data generation for numpy call »
I'd like to know how to make the following code shorter and/or more efficient. Could I (or should I) get rid of the for loop by using a functional me...
(2) odpowiedzi
2017-01-01 20:01 Golang: why using goroutines to parallelize calls ends up being slower? »
I have two versions of merge sort implementation. The first is a "normal" version and the second uses goroutines that parallelize the work being done ...
(2) odpowiedzi
2017-01-01 15:01 Are compiler optimization solving thread safety issues? »
I'm writing a C++ multi-threaded code. When testing the overhead of different mutex lock I found that the thread unsafe code seem to yield the corre...
(1) odpowiedzi
2017-01-01 10:01 Faster Alternative to Math.sqrt() »
Are there any alternatives to using Math.sqrt() to get the square root of an unknown value? For example: var random = (Math.random() * (999 - 1)) +...
(5) odpowiedzi
2016-12-31 21:12 Java List Horrible Adding Performance »
I'm adding millions of entries of a custom object to a List. This turns out to be very slow and the graphical user interface keeps freezing randomly a...
(1) odpowiedzi
2016-12-31 16:12 Unexpected performance of a single "for" loop in Rcpp »
Can somebody explain to me somewhat odd behavior of simple for loop written using Rcpp (code is below). Based on microbenchmark output it seems that t...
(1) odpowiedzi
2016-12-31 08:12 I observed a Java process running at root level through top command on my application server, will it lead to performance problems? »
We were running a load test and simultaneously executed top command and observed that Java process (running at root level) was consuming 204℅ cpu, e...
(1) odpowiedzi
2016-12-30 22:12 Start Activity is slow and the new activity is empty »
This is my first android app, I'm transitioning from iOS development. I'm trying to change to a different activity. However, it takes multiple seconds...
(3) odpowiedzi
2016-12-30 11:12 count how many elements in a numpy array are within delta of every other element »
consider the array x and delta variable d np.random.seed([3,1415]) x = np.random.randint(100, size=10) d = 10 For each element in x, I want to coun...
(2) odpowiedzi
2016-12-30 00:12 Performance of == vs Equals in generic C# class »
For some reason C# does not allow == operator use in generic classes like here: class Mine<T> where T : struct { T val; public T Value ...
(2) odpowiedzi
2016-12-29 20:12 Most efficient global property implementation in QML »
I am currently using properties, declared in the root qml file, and they work globally, because of dynamic scoping, but I am worrying that eventually ...
(0) odpowiedzi
2016-12-29 11:12 Applicative functors vs monad composing performance in Scala »
I have two monad instances val a: M[A] and val b: M[B]. Would there be any performance difference in the following code cases? def f: (A, B) => C...
(1) odpowiedzi
2016-12-29 00:12 Whats the performance cost on iterating on a list multiple times »
I have a List I need to iterate through and perform work on along the way. My problem is that, for my program, its difficult to do all the work needed...
(5) odpowiedzi
2016-12-28 02:12 Tensorflow training becomes slower and slower when iteration is more than 10,000. Why? »
I feed the data to the graph with input pipeline methods, and tf.train.shuffle_batch is implemented to generate batch data. However, with the training...
(0) odpowiedzi
2016-12-28 00:12 Why is `Time.utc` slower in a forked process in Ruby on OS X (and not in Python)? »
I saw the question Why does Process.fork make stuff slower in Ruby on OS X? and was able to determine that Process.fork does not actually make tasks, ...
(1) odpowiedzi
2016-12-28 00:12 How to determine which side of go channel is waiting? »
How do I determine which side of a go channel is waiting on the other side? I'd like to know this so I can figure out where my processing is being li...
(1) odpowiedzi
2016-12-27 23:12 Does "std::string + char" expression create another std::string? »
Does the expression below create another std::string and then add it to s1? std::string s1 = "abc", s2 = "xyz"; s1 += s2 + 'b'; Should it p...
(2) odpowiedzi
2016-12-27 21:12 Why does R's duplicated perform better on sorted data? »
While comparing the efficiency of two functions in an answer to Check if list contains another list in R, I stumbled upon an interesting result. Sorti...
(0) odpowiedzi
2016-12-27 19:12 Why does classing a list slow down the lengths() function? »
I've just noticed that classing a list, by adding an additional label to the class attribute (S3) or defining a new parent class (S4) drastically slow...
(1) odpowiedzi
2016-12-26 17:12 Why tuples are not enumerable in Elixir? »
I need an efficient structure for array of thousands of elements of the same type with ability to do random access. While list is most efficient on i...
(2) odpowiedzi
2016-12-26 08:12 Does Go runtime evaluate the for loop condition every iteration? »
Here is a code snippet from the book "The Go Programming Language": for t := 0.0; t < cycles*2*math.Pi; t += res { ... } It appears that the...
(3) odpowiedzi
2016-12-26 01:12 numpy ufuncs speed vs for loop speed »
I've read a lot "avoid for loops with numpy". So, I tried. I was using this code (simplified version). Some auxiliary data: In[1]: import numpy as n...
(1) odpowiedzi
2016-12-25 19:12 Do operations on ThreadLocal have to be synchronized? »
Here is the code I've stumbled across: class TransactionContextHolder { private static final ThreadLocal<TransactionContext> currentTransactio...
(1) odpowiedzi
2016-12-25 13:12 Should I refer std::vector size when the number is explicitly given »
I'm coding a simple function using std::vector below where input is an integer vector and the function proceeds the iteration based on the number of e...
(1) odpowiedzi
2016-12-25 11:12 Android proper way to fit layout on all devices horizontally and vertically »
Hello I want to ask about the most efficient way to adjust layout in all devices mobile and tablets sometimes I can't use wrap_content and layout_wei...
(1) odpowiedzi
2016-12-24 23:12 Matching IDs Between Pandas DataFrames and Applying Function »
I have two data frames that look like the following: df_A: ID x y a 0 0 c 3 2 b 2 5 df_B: ID x y a 2 ...
(3) odpowiedzi
2016-12-24 11:12 Conditionally rendering a react component »
For a component that is hidden at some point in its lifecycle, what is the best way to render it? 1) render the component, but do not show it (display...
(1) odpowiedzi
2016-12-24 08:12 python operation on sub-dimension of a numpy array »
A lot of numpy functions provide the option to operate over certain axis with axis= parameter. My question is How this 'along axis' operations are i...
(2) odpowiedzi
2016-12-23 21:12 Recycler view - resizing item view while scrolling (for carousel like effect) »
I need to create a vertical recyclerview in which item view in center of the screen should be resized to have zoom like effect while scrolling. Thing...
(1) odpowiedzi
2016-12-23 16:12 Why is this SSE code 6 times slower without VZEROUPPER on Skylake? »
I've been trying to figure out a performance problem in an application and have finally narrowed it down to a really weird problem. The following piec...
(2) odpowiedzi
2016-12-23 14:12 SQL query takes more than an hour to execute for 200k rows »
I have two tables each with around 200,000 rows. I have run the query below and it still hasn't completed after running for more than an hour. What co...
(3) odpowiedzi
2016-12-22 21:12 TPL - ExecutionDataflowBlockOptions defined BoundedCapacity degradetes performane »
Is there any way how to limit performance degradation with TPL throttling? I have a complicated pipeline of components and trying to limit a memory r...
(1) odpowiedzi
2016-12-22 11:12 Caching Pattern for Fetching Collections »
Is there a caching strategy/pattern that can be used for fetching multiple items, where only some may be cached? Does it make sense to use a cache in...
(0) odpowiedzi
2016-12-22 09:12 When should streams be preferred over traditional loops for best performance? Do streams take advantage of branch-prediction? »
I just read about Branch-Prediction and wanted to try how this works with Java 8 Streams. However the performance with Streams is always turning out...
(5) odpowiedzi
2016-12-21 16:12 Java vs C# speed comparison in path search algorithm »
Firstly I'm not sure if this is the right place to post this question, so if I am wrong, please, move it. Thanks. I had an assignment to compare same...
(0) odpowiedzi