311 questions
1
vote
0
answers
59
views
In Postscript, does loading a dictionary to run a procedure have the same overhead as doing a lookup of the procedure name in the dict?
/myDict<<
/myProc {
(Hello world) =
}
>>def
myDict begin %A
myProc %A
end %A
myDict /myProc get exec %B
Given the above Postscript ...
0
votes
1
answer
282
views
Does invoking a system call like statfs with Python subprocess use less overhead than invoking a C utility like df?
Unix-based system. I'm trying to use as little overhead as possible right now in the code I'm working on (it's in a resource constrained space). In this particular code, we are gathering some basic ...
0
votes
1
answer
132
views
What is the overhead for the Redis index?
According to https://www.youtube.com/watch?v=d1dFmF3IJOI&t=3s minute 3:25, 2TB in Flash requires 75GB overhead in RAM. This means the 75GB only holds the index and not the data. The data are ...
0
votes
0
answers
114
views
GCC option to avoid function calls to simple get/set functions? [duplicate]
There maybe a very simple solution to this problem but it has been bothering me for a while, so I have to ask.
In our embedded projects, it seems common to have simple get/set functions to many ...
0
votes
0
answers
84
views
define temporary c++ Eigen variables for convenience
I have some Eigen vectors which are concatenated from parts which I want to access. For this I use the block method. However, I need to access the same part over and over in different parts of the ...
2
votes
1
answer
1k
views
Is it a bad practice to export all different widgets inside a single widget then import these widgets by importing this single file wherever we need?
If I create a file like widgets.dart and put the exportation of all my widgets inside that like below:
export 'custom_app_bar.dart';
export 'content_header.dart';
export 'vertical_icon_button.dart';
...
0
votes
1
answer
247
views
Lock CPU resources in production critical applications (safety overhead)
When coding an app for Windows (c++, c#), is there a way to lock a certain amount of cpu percentage or cores or threads so they cannot be used by other programs or processes when said app is running? ...
0
votes
1
answer
85
views
Scala match expression as a switch statment
I am trying to use a scala match expression as a switch statement. I do not have my case values stored in an array and want to generate it during runtime.
while (completedTasks < todoTasks) {
...
0
votes
0
answers
33
views
OpenMP thread spawn overhead [duplicate]
To learn more about thread spawn overhead in OpenMP, I've experimented with an empty nested loop with the inner loop parellelized and compared it to the same nested loop without multiprocessing.
...
0
votes
2
answers
1k
views
python multithreading while waiting for API call
Detailed: I'm using python to make a small app that scrapes a top 100 song list and creates a spotify playlist from it. I'm bottlenecked by the fact that the spotify API only lets you search by one ...
2
votes
0
answers
321
views
How to limit memory overhead when streaming a file?
I'm trying to read a file in smallish chunks with Python to get around the issue of having < 1G of memory to play with. I'm able to write the file to disk and read in chunks, but no matter what I ...
0
votes
1
answer
103
views
Xcode profiler: sigprocmask & __sigaltstack overhead
I am profiling my app (built with Codename One) using Xcode and an iPhone X device. I notice that, during heavy calculations (single- or multithreaded), sigprocmask and __sigaltstack (from ...
2
votes
1
answer
137
views
Avoid code redundancy/computational overhead with function extracted from a code snippet inside a loop
I have a loop that cycles days and discretised time slots of a financial time series, and some code for my strategy lies inside it. I extracted this inner code to a standalone function, to be able to ...
2
votes
1
answer
538
views
MySQL/Mariadb per-record overhead?
what, if any, is the per-record disk overhead for mysql/mariadb? (i'm mostly interested in InnoDB, but any engine would interesting)
lets say you just have a
CREATE TABLE tbl (
id BIGINT NOT NULL ...
1
vote
1
answer
227
views
Efficiency comparison: function pointer vs function object vs branched code. Why is function object worst performing?
I was hoping to improve performance by passing function pointer or a function object to a function call within a nested loop, in order to avoid branching of the loop. Below are three codes: one with ...
3
votes
2
answers
813
views
C# length 1 array versus single value, performance and memory overhead
Question:
What is the performance and memory overhead of using an array with the length of 1 instead of the value directly?
private Item[] item = new Item[1];
vs.
private Item item;
...
6
votes
1
answer
4k
views
HTTP2 ERR CONNECTION CLOSED (Too much overhead)
We are developing a project using Angular in the front and Spring at the backend. Nothing new. But we have set-up the backend to use HTTP2 and from time to time we find weird problems.
Today I ...
-1
votes
1
answer
107
views
Qt GUI causes CPU overhead
My code looks like this.
User press a key and gui is updated.
But, when user press a key continuously without releasing, CPU is stressed and the system freezes, until the GUI completes all the tasks ...
1
vote
1
answer
181
views
Is the overhead for utilizing a vector with insert() as a priority queue relative to utilizing a heap? (c++)
I am currently working on a project where I implemented a vector of structure pointers to use as a priority queue. I use a for loop to determine position in the vector (if not less than the back) and ...
3
votes
1
answer
285
views
Python is facing an overhead every 98 executions?
I have a big database, I just want to assign a constant to a new column. At the first executions (from 1 to 97); everything is fine, the code runs fast. Then the memory rockets at the iteration 98, ...
1
vote
1
answer
2k
views
Overhead for Golang's logger if set to discard
I have a HTTP handler that has 40 loggers that is set to os.Stdout.
It works just fine for me as I am the only one testing at the moment.
But, when it goes to the production, I'm afraid it will have ...
5
votes
0
answers
327
views
Server-side virtual DOM, what session state overhead in Blazor?
Before committing to a Blazor Server project I need to understand what additional server session-state storage is imposed by the Razor-Components architecture. I understand that a Virtual DOM is an ...
6
votes
4
answers
815
views
Zero-cost lists for inline functions in c++
I like writing checks for a function over a list. For this I usually write a function like this:
inline bool good_strings(const std::vector<const char *> & items)
{
for (i in items) {
...
14
votes
1
answer
2k
views
Does passing a `unique_ptr` by value have a performance penalty compared to a plain pointer?
Common wisdom is that std::unique_ptr does not introduce a performance penalty (and not a memory penalty when not using a deleter parameter), but I recently stumbled over a discussion showing that it ...
-1
votes
1
answer
167
views
Memory usage increases dramatically [closed]
I have a problem with memory usage of my code and it is that the memory increase dramatically, 3 GB per hour and I need around 80 hours for my calculation. How can I check memory usage for each part ...