dom96/ParticleBench — pull request #1 by ReneSac (2014-01-23 06:43:10+00:00)
Title: Shorter version based on arrays and a refactored newVertex

***WARNING*** I haven't managed to compile to test it by missing dependencies. So please test it beforehand. ***WARNING***

I'm not sure if using vectors introduced an performance regression.
Also, check all the comments I left in the source, and correct the code when needed.

I managed to shave almost 60 lines of code, eliminating almost all the repetitive stuff. Too bad tuples implementation is broken, otherwise the code would be prettier and some lines shorter. I added a const declaration on top, to be able to declare the types consistently (also not needed if tuples were working...)

I didn't had time for refactoring the function calls. Maybe latter, after it is accepted, if it indeed provides an speed-up.