Data dodania Pytanie
2017-09-16 20:09 Performance concern for a generic mechanism of saving files »
I want to create a generic mechanism for saving files in my application and database and to do that I have come up with the idea of creating two table...
(1) odpowiedzi
2017-09-16 18:09 Bin elements per row - Vectorized 2D Bincount for NumPy »
I have a NumPy array with integer values. Values of matrix range from 0 to max element in matrix(in other words, all numbers from 0 to max data elemen...
(1) odpowiedzi
2017-09-16 18:09 How do we calculate number of calls in naive fibonaci? »
So the following is not optimized fibonacci function: sub fib { my ( $n ) = @_; return 1 if( $n == 1 || $n == 2 ); return fib( $n...
(3) odpowiedzi
2017-09-15 22:09 Fast multipliction of multiple matrices by multiple vectors »
In matlab, I would like to multiply M vectors using L matrices, resulting with M x L new vectors. Specifically, say I have a matrix A of size N x M an...
(2) odpowiedzi
2017-09-15 18:09 Use multi-core in LINUX to run R-script »
I have a function called "my_function" and I want to run in parallel using mcapply in in LINUX using multi-cores. I have 10 cty_id's 20 years to run f...
(1) odpowiedzi
2017-09-15 15:09 MySQL select query gets quite slow with BOTH where and descending order »
I have this select query, ItemType is varchar type and ItemComments is int type: select * from ItemInfo where ItemType="item_type" order by ItemComme...
(3) odpowiedzi
2017-09-15 09:09 Generating a LOT of unique tokens in Ruby »
I needed to generate a lot of unique codes, for two lists of codes, that cannot match with each other and be unique codes. It has to be seven characte...
(2) odpowiedzi
2017-09-14 20:09 Is holding static reference to multiple objects in abstract class OK? »
Is there anything significantly bad in terms of performance, memory consumption, design etc about below pattern ? public abstract class A { publi...
(2) odpowiedzi
2017-09-14 14:09 Fast way of iterate over trues in boolean array »
I have a big array of booleans and i need just to work with the true elements, and need theyer index. for (int x = 0; x < cells.length; x++) { ...
(5) odpowiedzi
2017-09-14 07:09 Find string to regular expression programmatically? »
Given a regular expression, is is possible to find a string that matches that expression programmatically? If so, please mention an algorithm for that...
(4) odpowiedzi
2017-09-14 02:09 How to tell if any element in a list of combinations is in a specific set in the most efficient way? »
here is what i mean by the question: j = [1,2,3,4,5,6,7] k = [1,2,3,4,5,6,7] #I want to generate all possible pairs of pairs with these two lists, f...
(0) odpowiedzi
2017-09-13 17:09 Approx. of π used to compare Sequential v/s Parallel speeds in java. Why .parallel() was slower? »
Can someone please explain me why the sequential version π-approximation was faster than the parallel one? I can't figure it out I'm playing around...
(2) odpowiedzi
2017-09-13 13:09 Speed up a loop in R to eliminate part of a string in a dataframe »
I have the following huge dataframe: > dim(cons) [1] 14279806 5 > head(cons) Gene.ID Gene.Symbol Transcript.ID ...
(3) odpowiedzi
2017-09-13 09:09 Push reference of string element in an array in to new array of string »
Given the following code: var old_Array =["One","Two","..."]; var len = old_Array .length; var new_Array =[]; for(var i=0;i<len;++...
(2) odpowiedzi
2017-09-12 15:09 Java Streams: distinct() on a pre-sorted stream? »
As discussed in this question, the implementation of distinct() is able to use a more efficient algorithm when the stream it operates on is known by t...
(1) odpowiedzi
2017-09-12 15:09 Conversion of number to date affect the performance in oracle »
I have below query where the DT_ID is number data type column and the value stored in this column is date in the format 'YYYYMMDD'. In my below quer...
(1) odpowiedzi
2017-09-12 14:09 Comparison: import statement vs __import__ function »
As a followup to the question Using builtin __import__() in normal cases, I lead a few tests, and came across surprising results. I am here comparing...
(3) odpowiedzi
2017-09-12 10:09 Perfomance of map vs starmap? »
I was trying to make a pure-python (without external dependencies) element-wise comparison of two sequences. My first solution was: list(map(operator...
(2) odpowiedzi
2017-09-12 02:09 Could CDN be faster way to load resources? »
I was setting up the admin panel for a blog today, and I decided just to use the CDN bootstrap link rather than keeping the files local on the server ...
(4) odpowiedzi
2017-09-11 22:09 Is there any benefit on declaring a local constant of string over a local variable C# »
Is there any noticeable benefit regarding performance on using a constant over a string. Suppose the following case public void MethodUsingConstant()...
(1) odpowiedzi
2017-09-11 11:09 Can this Neo4j query be optimized? »
I have rather large dataset (20mln nodes, 200mln edges), simplest shortestPath queries finish in milliseconds, everything is great. But... I need to...
(1) odpowiedzi
2017-09-11 09:09 HTML - Removing elements takes more time than adding elements - Why? »
I have a table with a lot of rows (like 10.000). When I receive new data I want to clear the rows first. Weirdly enough, clearing the table takes much...
(1) odpowiedzi
2017-09-11 05:09 Best way to iterate over an array that uses its own output »
Firstly, I'd like to apologize for the badly worded title - I can't currently think of a better way to phrase it. Basically, I'm wondering if there's ...
(3) odpowiedzi
2017-09-10 18:09 Why is HashSet<Point> so much slower than HashSet<string>? »
I wanted to store some pixels locations without allowing duplicates, so the first thing comes to mind is HashSet<Point> or similar classes. Howe...
(2) odpowiedzi
2017-09-10 18:09 Trouble simplifying repetitive - multiple if elif statements and multiple loops in a function in python »
I am very new to Python. I am a firm believer of simple, concise and efficient algorithmic design as well as coding style. As I am learning Python, I...
(3) odpowiedzi
2017-09-10 12:09 Does adding an index on the column you are selecting speed up the query? »
I have a fairly common setup, I have a table of tags and record pairs. Querying it is slow so adding an index to the column of the tag I am querying h...
(2) odpowiedzi
2017-09-10 10:09 How to optimize memory access pattern / cache misses for this array decimate/downsample program? »
I was recently asked about a piece of code to decimate/downsample the array "in-place". This "decimation" function takes an array of ints and stores a...
(5) odpowiedzi
2017-09-10 00:09 Can modern x86 implementations store-forward from more than one prior store? »
In the case that a load overlaps two earlier stores (and the load is not fully contained in the oldest store), can modern Intel or AMD x86 implementat...
(2) odpowiedzi
2017-09-09 23:09 FPS dropped in the android application and Activity responds to input with a delay »
I encountered a problem: when running MainActivity, there is a drawdown of fps and a response to depressed presses occurs. If you make a long touch on...
(0) odpowiedzi
2017-09-09 17:09 How could I smooth the output process of my Qt Slotmachine »
I'm trying to build a Slotmachine in Qt. I'm not using QtQuick, just a QGraphicsScene and a QGraphicsView. The program is working but not that smooth ...
(0) odpowiedzi
2017-09-09 05:09 Quickest sorting mechanism for sorting by multiple predicates in python »
import operator a = [[1,0.7,1],[4,0.8,1],[5,0.8,0.99],[11,0.9,0.98]] b = sorted(a, key=lambda x:x[1], reverse=True); c = sorted(b, key=lambda x:x[2], ...
(1) odpowiedzi
2017-09-08 16:09 Additional argument in operator() in boost::static_visitor »
I have to create boost::variant object and use static_visitor. Unfortunately I need extra parameter... What solution is better? To have this object...
(1) odpowiedzi
2017-09-08 10:09 What is the fastest way to compute sum of weighted products between columns? »
np.random.seed([3, 14]) df = pd.DataFrame(np.random.randn(5, 3), columns=list('ABC')) df A B C 0 -0.602923 -0.402655 0.302...
(2) odpowiedzi
2017-09-08 08:09 In Android ,how to receive GPS location continuously? »
Issue in onLocationChanged() function of location listener of android.location.LocationListener. In Below code after requesting requestLocationUpdate...
(4) odpowiedzi
2017-09-07 18:09 Why do the goroutines not scale? »
Background I am currently working on my bachelor thesis and basically my task is to optimise a given code in Go, i.e. make it run as fast as possible...
(1) odpowiedzi