9
votes
Game of life(random generation)
Using attributes
Why is iteration passed into the LifeGame.print function? This makes more sense to me as an attribute on ...
- 865
6
votes
Game of life(random generation)
You explain that you wish to improve CPU consumption but you
don't know where to begin.
Always start optimizing by asking "where did the cycles go?"
Run the profiler:
...
- 9,138
4
votes
Single Producer Single Consumer lockless ring buffer implementation
Few things in addition to already two great answers.
'Theoretically' this is as fast a single producer single consumer ring buffer can can get in a modern processor (larger read/write commit batches ...
- 41
3
votes
Accepted
Moving increments into condition checks?
A couple of things:
First: those two code samples are not actually identical functionally.
In terse, the memory address at s is set to t and then the value at s is evaluated to determine if it's the ...
- 166
2
votes
Find factor pairs of an integer in Rust
My solution with a custom iterator runs almost 2x faster. Your main bottleneck is the multi_cartesian_product iterator that produces results on the heap (...
- 1,359
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
performance × 8927python × 2257
java × 1276
c++ × 1033
algorithm × 984
c# × 869
javascript × 835
programming-challenge × 632
python-3.x × 619
beginner × 609
c × 525
strings × 370
array × 318
php × 298
vba × 276
excel × 275
sql × 257
numpy × 237
primes × 211
jquery × 206
matrix × 181
python-2.x × 179
image × 175
multithreading × 170
recursion × 155