10
votes
Accepted
Improving particle performance in P5.js
Performance
The main reason for the slow down are the state changes you incur each time you change the color and transparency of the particle (which is each particle). Unless you are prepared to write ...
3
votes
Accepted
Multithread reading and processing when working with HDF5 files
user673679’s answer covers pretty much all of the suggestions I thought to make about the actual code as presented. But it doesn’t answer the primary question: “Is there a more efficient way of ...
2
votes
Simple definite integral calculator
Using the max of two consecutive values is asymmetric.
(I'd simply use the value sampled, avoids the following issue, too:)
For most every "sample" (i), the code ...
Community wiki
2
votes
Improving particle performance in P5.js
You might be able to improve performance by removing particles once they have left the boundaries of the screen. This should reduce your particle count substantially.
Another option to pursue would ...
1
vote
Simple definite integral calculator
This is a strange way to compute an integral. For each step, you're choosing the greater of the f(x) values given the current i or the previous ...
1
vote
Clone of "Pop the Lock" iPhone Game
First of all, something regarding usability: The player has to press space to start, space to play, but click to restart or continue. If you were using space for all of these actions the player wouldn'...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
processing × 21java × 6
performance × 6
game × 5
datetime × 3
javascript × 2
algorithm × 2
multithreading × 2
homework × 2
animation × 2
computational-geometry × 2
graphics × 2
c++ × 1
beginner × 1
graph × 1
classes × 1
playing-cards × 1
simulation × 1
gui × 1
memory-optimization × 1
numerical-methods × 1
canvas × 1
physics × 1
collision × 1
signal-processing × 1