
25 Mar
2008
25 Mar
'08
11 p.m.
Barend Gehrels wrote>
To be honest I've done some experiments, also with a polygon with a compile-time number of vertices. Called it the template <size_t D> gon, so a gon<3> for a triangle, etc. It disappointed me a bit because the compile-time area calculation routine which I drafted turned out to be slower than the runtime version...
Do you mean the version generated using a compile time area calculation turns out to be slower at runtime than the native runtime version? I don't understand how this might be possible. What are you trying to achieve at compile time? Regards Hartmut