Questions tagged [processing-efficiency]
622 questions
4
votes
3 answers
How to speed up simple mutate command in R
I'm very new to R, but I have a relatively simple mutate command which I'm running on a large dataset (4,000,000+ rows x 150 columns) which currently takes 15+ hours to run.
The query uses an if statement which only looks at a couple of columns - a…

TimL
- 211
- 2
- 11
4
votes
1 answer
How to decrease the time taken to open a large csv file in Julia (using CSV and DataFrames)?
I'm a R user with great interest for Julia and strongly willing to switch to Julia on the long term. I looked for a large csv file on the internet and found this website of US government and downloaded the College Scorecard dataset. I tried to read…

ecjb
- 5,169
- 12
- 43
- 79
4
votes
0 answers
How to obtain the probability distribution of a sum of dependent discrete random variables more efficiently
I hope you are well. I was wondering if you could help me with the question provided in the attached link, please. Below the link I attach an R-code that solves the problem recursively for particular values of the parameters of the distributions…

Student1981
- 319
- 1
- 8
4
votes
3 answers
Which is more efficient: Creating a "var" and re-using it, or creating several "let"s?
Just curious which is more efficient/better in swift:
Creating three temporary constants (using let) and using those constants to define other variables
Creating one temporary variable (using var) and using that variable to hold three different…

retrovius
- 782
- 1
- 10
- 25
4
votes
3 answers
How does an Android Studio deal with System.out.print functions when making a final version of an app?
My question is simple. If I make an app with android studio leaving in print functions, will they run when I run the app and take up computational power? or will android studio automatically get rid of them? Or do they stay there but not run due…

William Derksen
- 115
- 3
- 6
4
votes
8 answers
most efficient way to get current time/date/day in C
What is the most efficient way of getting current time/date/day/year in C language? As I have to execute this many times, I need a real efficient way.
I am on freeBSD.
thanks in advance.

hari
- 9,439
- 27
- 76
- 110
4
votes
2 answers
Fastest way to delete duplicates in large wordlist?
A similar question was made here but they didn't address why there is a speed difference between sort and awk.
I made this question first on Unix Stackexchange but since they told me this would be a good question for Stackoverflow I'll post it…

Karl
- 481
- 1
- 6
- 13
4
votes
3 answers
Efficiency of running many more jobs than CPUs
I have a large set of jobs to run (thousands), each one takes between 30 minutes to a few hours on a single CPU. The memory requirements are small (few KB each). I'm working on a small linux cluster that has a few dozen CPUs. So far, I've been…

user2509951
- 195
- 1
- 6
4
votes
1 answer
Is there a faster method to convert bitmap pixels to greyscale?
At the moment, I am using the SetPixel() method to change the colour of every pixel in a bitmap. This works fine on small images with small dimensions, but when I test it on large images it does take a while.
I haven't worked with images in VB.Net…

Piratica
- 483
- 2
- 11
4
votes
3 answers
Highlight particular characters in the string for all the characters of given string
Particular characters are to be highlighted in red color on the label so I wrote below function which works well, but I want to confirm, is there any other efficient way of doing this ? e.g.…

Janak Nirmal
- 22,706
- 18
- 63
- 99
4
votes
3 answers
Circular buffer in MATLAB, **without** copying old data
There are some good posts on here (such as this one) on how to make a circular buffer in MATLAB. However from looking at them, I do not believe they fit my application, because what I am seeking, is a circular buffer solution in MATLAB, that does…

Spacey
- 2,941
- 10
- 47
- 63
4
votes
3 answers
What is the best scenario for one fast producer multiple slow consumers?
I'm looking for the best scenario to implement one producer multiple consumer multithreaded application.
Currently I'm using one queue for shared buffer but it's much slower than the case of one producer one consumer.
I'm planning to do it like…

Mehraban
- 3,164
- 4
- 37
- 60
4
votes
1 answer
Efficiency with very large numpy arrays
I'm working with some very large arrays. An issue that I'm dealing with of course is running out of RAM to work with, but even before that my code is running slowly so that, even if I had infinite RAM, it would still take way too long. I'll give a…

cracka31
- 173
- 2
- 15
4
votes
2 answers
Updating Dynamic Form Fields in MySQL Database
I have created a form that allows users to dynamically add as many fields as needed. Each of these is an inventory item that is assigned to a device. I have 3 tables, the Devices, the Inventory Items, and the third to associate the Device with an…
user470760
3
votes
5 answers
Which is more efficient - Computing results using a functionin realtime or reading the results directly from a database?
Let us take this example scenario:
There exists a really complex function that involves mathematical square roots and cube roots (which are slower to process) to compute its output. As an example, let us assume the function accepts two parameters a…

dsignr
- 2,295
- 2
- 35
- 45