Data dodania Pytanie
2017-04-10 13:04 Laravel PHP foreach(User::all() as $user) performance »
if I write a foreach loop like this, is the method all() called every loop again or only once? foreach(User::all() as $user) { ... } In C# I know, ...
(1) odpowiedzi
2017-04-10 13:04 Why can't Scala Collection fuse transformers? »
I am going to write a high-performance application on Scala and I am trying to figure out best practice for gaining as much performance as possible. D...
(0) odpowiedzi
2017-04-10 06:04 Java : Creating chunks of List for processing »
I have a list with a large number of elements. While processing this list, in some cases I want the list to be partitioned into smaller sub-lists and ...
(3) odpowiedzi
2017-04-09 20:04 Arduino motor speed and direction »
I would like to make a program to control my Arduino Bluetooth car. I'm having lots of trouble making it in a desired direction and at a desired spee...
(1) odpowiedzi
2017-04-09 18:04 How to create custom library and add it on Gradle »
I am about to create my first custom library. I googled, but unable to find the answer of these question. How to add my library on Gradle, so end us...
(1) odpowiedzi
2017-04-09 01:04 longest time lazy flappy bird can survive - consecutive gap between 2 arrays »
given two arrays: import numpy as np L1 = np.array([3, 1, 4, 2, 3, 1]) L2 = np.array([4, 8, 9, 5, 6, 7]) I want to efficiently find the longest con...
(1) odpowiedzi
2017-04-08 18:04 C - 'Greater than' vs 'Greater than or equal to' performance »
I'm a bit curious about how these comparison operations work underneath the hood, as I'm trying to optimize my code as much as possible and develop go...
(1) odpowiedzi
2017-04-08 15:04 Code optimization python »
I wrote the below function to estimate the orientation from a 3 axes accelerometer signal (X,Y,Z) X.shape Out[4]: (180000L,) Y.shape Out[4]: (180000L...
(1) odpowiedzi
2017-04-08 01:04 Copying the data from a small data.frame to a bigger data.frame »
Let d be a pre-allocated big matrix d = as.data.frame(matrix(NA,ncol=3,nrow=5e7)) names(d) = c("x","y","z") dsub is a small matrix with the same nu...
(1) odpowiedzi
2017-04-07 19:04 Why is the compiler optimizing these cases differently? »
The snippet of code found below demonstrates a situation in which calling the CRC32 compiler intrinsic on 7 bytes of data in two different ways (e.g. ...
(1) odpowiedzi
2017-04-07 19:04 Lazy initialization of Fabric kits? »
Is it possible to lazily initialize Fabric Kits? for example, right now I do: Fabric.with(this, crashlytics, twitterCore, tweetUi); // 500ms I woul...
(2) odpowiedzi
2017-04-07 10:04 C++ emplace_back parameters »
Here is a piece of code in my daily work. I just want to ask you if there is any difference between the two cases, especially in terms of performance....
(1) odpowiedzi
2017-04-07 09:04 Large string(40 mb) insertion in Database - logging / Performance issue »
Java version : 1.7 Database : PostgreSQL I need to insert large String in Database in multithreading application for each activity where Sting size ...
(0) odpowiedzi
2017-04-07 05:04 Why are MongoDB upserts so much slower than inserts (with a unique index)? »
I've been testing the limits of MongoDB to see whether it will work for an upcoming project and I've noticed that upserts are quite slow compared to i...
(1) odpowiedzi
2017-04-06 22:04 Sorting an array and indexOf() runtime »
Is it safe to assume that array.indexOf() does a linear search from the beginning of the array? So if I often search for the biggest value, will sort...
(1) odpowiedzi
2017-04-06 17:04 Increase performance in Mule ESB having multiple for each and multiple flow reference »
We need to process millions of records, from database to microsoft product. In our flow we are calling multiple flows and in each flow we are using f...
(1) odpowiedzi
2017-04-06 09:04 Tricky postgresql query optimization (distinct row aggregation with ordering) »
I have a table of events that has a very similar schema and data distribution as this artificial table that can easily be generated locally: CREATE T...
(1) odpowiedzi
2017-04-05 23:04 How can I pinpoint if the slowness in my program is a CPU cache issue (on Linux)? »
I'm currently trying to understand some very very strange behavior in one of my C programs. Apparently, adding or removing a seemingly inconsequential...
(2) odpowiedzi
2017-04-05 22:04 Finding the smallest integer who's not a sum of a sorted array »
I just got back from an exam which had a question that I just don't know how to even approach: Given a sorted array (each element in the array is ...
(0) odpowiedzi
2017-04-05 19:04 How can I speedup this Julia code? »
The code implements an example of a Pollard rho() function for finding a factor of a positive integer, n. I've examined some of the code in the Julia ...
(1) odpowiedzi
2017-04-04 22:04 Shouldn't be 3x3 convolution much faster on GPU (OpenCL) »
I'm learning how to optimize code for GPU. I read about importance of memory locality. I've also seen some tutorials and examples of GPU convolution. ...
(1) odpowiedzi
2017-04-04 15:04 Alternative of Java String.split for better performance »
In the process of adding data by import from a csv/tab seperated file, my code consumes a lot of time to upload data. Is there any alternative to do t...
(2) odpowiedzi
2017-04-04 10:04 If statement vs if-else statement, which is faster? »
I argued with a friend the other day about those two snippets. Which is faster and why ? value = 5; if (condition) { value = 6; } and: if (con...
(7) odpowiedzi
2017-04-03 13:04 Best way to merge two objects and sum the values of same key? »
I have two objects similar to this: let data = [[ { 10: {key1: 1, key2: 2, key3: 3}, 11: {key1: 1, key2: 2, key3: 3}, 12: {key1: 1, ke...
(2) odpowiedzi
2017-04-03 13:04 Why is C array so much faster than std::array? »
We are currently writing some performance critical code in C++ that operates on many large matrices and vectors. Regarding to our research, there shou...
(2) odpowiedzi
2017-04-03 13:04 how to reduce 0(n) for finding the first instance of pairs that sum specific value »
I am doing a codewars problem, the instructions are as follows: Given a list of integers and a single sum value, return the first two values (parse fr...
(1) odpowiedzi
2017-04-03 11:04 Query, SQL, Ruby on Rails »
I am working a project and encountered a problem regarding writing the best query for the problem. I will start presenting the problem and the soluti...
(0) odpowiedzi
2017-04-02 17:04 optimizer always full scans table eben though fething only 3 rows »
I have a table foo which was created like this. CREATE TABLE foo AS SELECT * FROM all_objects; CREATE INDEX foo_I1 ON foo(owner,object_type,status);...
(1) odpowiedzi
2017-04-02 16:04 Improve Python + Influxdb import performance »
The following script is an extract from https://github.com/RittmanMead/obi-metrics-agent/blob/master/obi-metrics-agent.py import calendar, time impo...
(0) odpowiedzi
2017-04-02 14:04 Slow upload speed using Symfony2 - Nginx. 100 MB in 15 minutes »
I have a form in Symfony 2.7 to upload videos between 100MB - 500 MB to my web. The upload speed is around 700 kbps so a 100MB video last more than 15...
(0) odpowiedzi
2017-04-01 17:04 MySQL query becomes extremely slow when using Order By »
I have a messages table with 15 million rows. Below query returns about 5 million(But limited in 15 rows) records in less than 1 second : SELECT mes...
(2) odpowiedzi
2017-04-01 09:04 Verify that the key of a data.table is unique »
What is the fastest way to verify that the key of a data.table is unique? Is there a faster or more idiomatic way than has_unique_key <- function...
(0) odpowiedzi
2017-04-01 06:04 Unamanged to managed callback much slower when target is in another AppDomain »
I'm calling managed code from unmanaged code using a delegate. When I call into managed code in the default AppDomain I'm measuring an average of 5.4n...
(0) odpowiedzi
2017-03-31 23:03 Why do nested MaybeT's cause exponential allocation »
I have a program. import Control.Monad import Control.Monad.Identity import Control.Monad.Trans.Maybe import System.Environment tryR :: Monad m =&...
(1) odpowiedzi
2017-03-31 16:03 Unity: How to use all CPU cores for Camera.Render with Multi-threaded Graphics Jobs? Optimisations - not working? »
How to use Multi-threaded Graphics Job optimisations? I have a project (less of a game, more of an application) which uses many tens of cameras in a ...
(0) odpowiedzi