felixguendling / cista

Cista is a simple, high-performance, zero-copy C++ serialization & reflection library.
https://cista.rocks
MIT License
1.78k stars 113 forks source link

Avoid object instantiation in member_index function #147

Closed cflaviu closed 1 year ago

cflaviu commented 1 year ago

I think creating a big object just to find a member downgrades the performance. For this special case I recommend to use some fancy macros, eg. offsetof, even the sanitizers will complain. Maybe the sanitizers could be disabled for that specific code.

cflaviu commented 1 year ago

member_index for_each_field(Fn&& fn) functions are not used. Therefore there is no impact.

felixguendling commented 1 year ago

Is this closed as issue (for big objects) solved or does the issue still exist?