7 comments

[ 2.8 ms ] story [ 22.3 ms ] thread
You might want to look at Boost.Hana.
Nice. Got any benchmarks as compared to other libraries? Especially in terms of compile times, executable sizes

eg. Example benchmarks of another reflection libary: http://www.gamedev.net/page/resources/_/technical/general-pr...

Not yet. I'll try that benchmark. Thanks
I was unable to build that benchmark, however I did some tests for reflected vs non-reflected code. I've Implemented 40 classes each with one property and 3 methods. Every method was almost empty, just doing some computation like an addition and returning the value. The getter and setter for the property were standard. Here are the results: Compilation time increased by a factor of 7.5. Executable size increased by a factor of 19. Function call time increased by a factor of 25 (from non virtual). It may seem really really bad (aside for the function call time)... but, the classes were nearly empty. In the first two cases (increase in memory and compilation time) we should consider the increase per class/method/property, not the ratio on the previous measure, because the penalty only depends on the number of classes/methods/properties. So I can say that with 40 classes and 5x40 methods (3 + 1 getter and 1 setter per class) I got a penalty of: 3.18 seconds on compilation time. 2.17 Mega bytes on the executable size. I think that in a more realistic project the ratios would be much less. At least I am optimistic.
(comment deleted)