Questions tagged [overhead-minimization]

18 questions
24
votes
6 answers

How do I provide a default implementation for an Objective-C protocol?

I'd like to specify an Objective-C protocol with an optional routine. When the routine is not implemented by a class conforming to the protocol I'd like to use a default implementation in its place. Is there a place in the protocol itself where I…
8
votes
2 answers

HTTP vs Websockets with respect to overhead

I am building a file synchronization program (not unlike Dropbox) using node.js on both ends. I need to have potentially thousands of clients requesting data at the same time. Here is my current system: Server pushes notifications to client over a…
beatgammit
  • 19,817
  • 19
  • 86
  • 129
6
votes
1 answer

How can we estimate “overhead” of a compressed file?

Suppose we compress for example a .txt file that has 7 bytes size. After compression and convert to .zip file, the size will be 190 bytes. Is there a way to estimate or compute the approximate size of “overhead”? What factor affects the overhead…
user3184352
  • 121
  • 7
6
votes
2 answers

Reducing function call overhead in python

I developed an application which simulates N robots moving in a grid which try to maximize the amount of visited grid cells in a limited amount of steps, meeting in a goal point. It all works correctly, but is horrible slow. It is currently…
jcklie
  • 4,054
  • 3
  • 24
  • 42
5
votes
1 answer

overhead for moving std::shared_ptr?

Here is a C++ snippet. Func1 generates a shared object, which is directly moved into Func2. We think that there should not be overhead in Func3. Putting this snippet into Compiler Explorer, we see a 2-3 times shorter code with MSVC compared to clang…
4
votes
1 answer

Overhead in running Julia from command-line

I recently discovered Julia and I have compiled it from source today and have been playing around with it since. I have this very simple script where I time the multiplication of two random matrices julia_matmul.jl N = 100 A = rand(N, N) B = rand(N,…
Aeronaelius
  • 1,291
  • 3
  • 12
  • 31
3
votes
0 answers

Intel Pin multithreading instrumentation: How to only instrument the shared variable accesses between the threads?

I'm using Intel Pin to dynamically instrument the multi-threaded programs to do some data race detection. I instrument memory read/write instructions to collect memory traces at runtime and then analyze the log. The trace collection is simple, which…
3
votes
1 answer

'Binding' The 'new' Constructor To A Function In Javascript

I am creating a library with a function that might be called many thousands of times every second. This function requires the new constructor so as to bind a new set of data to a fixed prototype like so: var internalFunc = function(a) { this.foo…
1
vote
5 answers

Encryption Project: Need advice on how to eliminate method overhead

I am looking for advice. I have developed my own encryption algorithms because I enjoy it and I can. Now, I am looking to try a new idea. My idea involves consolidating a number my algorithms into a larger one. For instance, you call X.Encrypt()…
1
vote
2 answers

How to redirect from a normal JavaScript page to angular 6(microsite to angular 6)?

I just want my landing screen to be built in normal JavaScript to reduce the load and redirect to my angular 6 app on click of any buttons in landing screen. How can I redirect from index.html to another (Angular) index.html.
1
vote
1 answer

How to reduce time for multiprocessing in python

I am trying to build multiprocessing in python to reduce computation speed, but it seems like after multiprocessing, the overall speed of computation decreased significantly. I have created 4 different processes and split dataFrame into 4 different…
Hojin
  • 95
  • 1
  • 7
1
vote
3 answers

Combing through several large data structures of different classes in Python; How can I combine and store data I need while reducing memory usage?

What's going on I'm collecting data from a few thousand network devices every few minutes in Python 2.7.8 via package netsnmp. I'm also using fastsnmpy so that I can access the (more efficient) Net-SNMP command snmpbulkwalk. I'm trying to cut down…
Kamikaze Rusher
  • 271
  • 2
  • 10
1
vote
1 answer

Measuring and minimization of OpenCL overhead

I have a pyopencl program that make a long calculation (~3-5 hours per run). I have several kernels started one by one in cycle. So I have something like this: prepare_kernels_and_data() for i in range(big_number): # in my case big_number is…
petRUShka
  • 9,812
  • 12
  • 61
  • 95
1
vote
1 answer

How may i make global cache thread safe

My application used to be mono thread, but now to increase performance we need to make it multithread. We have Lists and ListItems in the following architecture: TBListItem = class(TBusinessObjects) private FList : TBList; protected …
0
votes
2 answers

how to static cast raw array into struct that only consists of reference to array

I have a performance-critical piece of code where an operator shall return a wrapped reference to a raw array: struct A{ float (&p)[32]; // << this is the only attribute of A; you may change the type of p into float* but iff there is no other…
1
2