Calculate gradient only in a masked area

I have a very large array with only a few small areas of interest. I need to calculate the gradient of this array, but for performance reasons I need this calculation to be restricted to these areas of interest. I can't do something like this: phi_...
more »

2017-07-18 16:07 (1) Answers

Custom allocator for std::bind

Perhaps the topic of std::bind and std::function is not clear enough to me - then, please, clarify. I'm trying to implement a thread pool (like this), but to avoid std::function and std::bind performance penalty due to heap allocations for the asynch...
more »

2017-07-15 19:07 (0) Answers

Caching in UI layer

We've got a UI built using AngularJS (1.x) which interacts with a REST Service layer for all its data needs. The data in the UI is a simple object graph (JSON). The functionality in the UI is 99% display and just couple of cases where the UI allows u...
more »

2017-07-12 22:07 (0) Answers

Caching and HTTP/2

On a site running with HTTP/2 i realize following caching setup: cache-control:max-age=604800, private etag:W/"115-54e8a25e7b187" expires:Fri, 14 Jul 2017 11:39:45 GMT last-modified:Tue, 02 May 2017 13:02:11 GMT Some questions about this setup: ...
more »

2017-07-12 13:07 (1) Answers

Unique random number sampling with Numpy

I need to create a 10,000 x 50 array in which each row contains an ascending series of random numbers between 1 and 365, like so: [[ 4 11 14 ..., 355 360 364] [ 2 13 15 ..., 356 361 361] [ 4 12 18 ..., 356 361 365] ..., [ 6 9 17 .....
more »

2017-07-11 23:07 (4) Answers

Ideas About How Speed Up Page With Javascript

I've built that page. and it's using the framework vue.js 2 and Jquery. It's blowing out my head because that page is very slow. Could you expert guys help me with some idea about how to speed up it. Thank Guys. The page is that: http://softwareapqp...
more »

2017-07-11 21:07 (1) Answers

Vectorise sequential numpy calculations

I have a number of operations in numpy which I can perfectly perform in a loop, but I haven't been able to vectorise them in one numpy call. # data matrix d = np.random.rand(1496, 1, 2) # boolean matrix r = np.random.rand(5, 1496, 1, 2) > 0.5 #...
more »

2017-07-10 04:07 (2) Answers

Angular 4 vs React performance - theory vs reality

This is basically the same old, same old x vs y, what is faster?, but I do hope my version is applicable. Also, React and Angular differ like GTK and Qt (or even more), and comparing them is stupid - one is an out-of-the-box can-do-anything framework...
more »

2017-07-06 10:07 (0) Answers

Autohotkeys function

Full disclosure: I didn't write this script. I am improving this after the person who wrote it left the company. This script is very simple, it adds what we call a "fixed charge" to an account once a ticket number has been entered and then the key...
more »

2017-07-04 21:07 (1) Answers

Replicating runghc performance with compiled code

I am running an application "as a script" with stack runghc. Naturally, it runs slower that way than when compiled and run with stack exec. I would like to compare the hotspots of the application as run with "runghc" relative to the compiled versio...
more »

2017-07-03 02:07 (0) Answers

fast search on a field in a Java object

I am not sure if my title truly reflects what I want to ask. I have a Java class called Light with a field: private int state. I am looking for suggestions on what would be a better / fastest way to access the "state" field as all the Light objects ...
more »

2017-06-30 06:06 (0) Answers

Excel VBA - How to do countif more efficiently?

I am working on an Excel VBA code for a spreadsheet. The aim of the following code is to count how many times the voucher number in this row appears in the whole column G. As the raw data has more than 60,000 rows, the following code will take more t...
more »

2017-06-26 01:06 (1) Answers