4 ms·
Nice. Got any benchmarks as compared to other libraries? Especially in terms of compile times, executable sizes eg. Example benchmarks of another reflection l
by ddengster 11y ago
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-programming/implementing-a-meta-system-in-c-r3905 http://www.gamedev.net/page/resources/_/technical/general-pr...
- m4nu3l 11y agoNot yet. I'll try that benchmark. Thanks
- m4nu3l 11y agoI 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.