performance issues
in
Programming Questions
•
1 year ago
hello all,
I have performance issues within a for-loop that lies in a recursion.
Can I just ask some questions?
I learned while searching for "performance" in the forum the compiler is pretty bright and makes good decisions.
Obviously, I declare everything outside loop and recursion to save it time.
1st question: Does the data type make a difference in terms of speed?
Let's say
- PVector []
- int[] // for x (or float)
- int[] // for y
- int[] // for z
or say
- PVector []
- MyOwnClass[]
Any difference?
2nd question: Does the usage of Strings and + need a lot of time?
- I heard usage of + with String is not recommended - what does the merging with StringBuilder look like?
3rd question: Allocated memory?
- When I make the memory usage higher in my IDE and compile, does the exe-file (the application) under Win 64 knows the higher memory usage? Or how can I enforce it? (or doesn't it matter since Win 7 provides memory dynamically?)
4th question: Are there other pitfalls?
- What are other pit falls?
Thank you!
Greetings, Chrisir
P.S.
I am referring to this beast, namely to tab Game2
(doesn't run in browser)
http://www.openprocessing.org/sketch/65645
1