Questions tagged [efficiency]

66 questions
27
votes
3 answers

What is the computational cost of $\sqrt{x}$ in standard libraries?

One of the major issues that we have to deal with in molecular simulations is the calculation of distance-dependent forces. If we can restrict the force and distance functions to have even powers of the separation distance $r$, then we can just…
aeismail
  • 3,523
  • 1
  • 18
  • 31
12
votes
1 answer

Costs of lookups versus calculations

I am interested in setting up calculations to check if a distance criterion is satisfied: that is, the distance between a vector ${\bf x}_i$ and anther vector ${\bf x}_j$ should be less than some value $r_{\rm max}$. My data is partitioned according…
aeismail
  • 3,523
  • 1
  • 18
  • 31
7
votes
3 answers

Is there any computational efficiency to global variables?

I'm wondering specifically in regard to a recursive function such as massive a game tree. I can't specifically say how big yet, but definitely pushing the limits of a given processor or processor array. Is it correct to say that passing a variable…
DukeZhou
  • 179
  • 5
3
votes
3 answers

Inverse compression for space-time trade off

A bit of a strange question - but I am developing an application where speed is critical, not memory - I have the ability to blow up to 3 TB on the data storage that this application will use and I am wanting to use a space time trade off to…
marscom
  • 171
  • 3
2
votes
2 answers

Why the same program runs faster on an older computer?

I have the same single thread problem, which is something like a simple #include #include #include #include //#include int main(){ clock_t start=clock(); for (int i=0;i<100 000 000; i++){ //do…
LCFactorization
  • 729
  • 1
  • 7
  • 15
1
vote
1 answer

Computing pairwise distances in a grid efficiently

I have a spline-based model where I have a set of control points in 3D space. I want to compute pairwise distances between every point on a regular 3D grid and these control points. Is there an efficient algorithm to do this in terms of space (i.e.…
Alan
  • 23
  • 2
0
votes
1 answer

Space Time tradeoff

I am wondering if you can answer a math question that I require answered for an evolutionary program that I am writing. With regards to the phenomenon known as the "space-time tradeoff" (wiki it) - what are the raw numbers for with regards to modern…
marscom
  • 171
  • 3
-1
votes
1 answer

How asymmetric encryption is done very fast

In any asymmetric encryption specifications, there is a step where we need to calculate data ^ public_key mod e to get encrypted_data, and, also, to decrypt using encrypted_data ^ private_key mod e. it's recommended to have keys to be around 2048…