pieper / cvg

constructive volume geometry tool
0 stars 1 forks source link

evaluate: using array or Vector3? #15

Closed bebbi closed 9 years ago

bebbi commented 9 years ago

PR #14 shows timings in browser.

Check https://github.com/bebbi/cvg/tree/test_Vector3_in_evaluate for a branch that calculates same shape with all Vector3 in evaluate. It ends up using a few more constructors per point. I'm estimating a 10-15% increase in rasterize (but dirty comparison and no stats). What do you think - should we go for Vector3 prototype in all evaluate, or rather keep converting where needed?

pieper commented 9 years ago

I tend to prefer the richer API and cleaner code of the Vector3 approach.

We can gain the performance back through early termination of the evaluation (the booleans that serve as bounding boxes) or through parallelization with workers or, eventually, through converting to GLSL.

bebbi commented 9 years ago

sounds good