|
Boost : |
From: Marcus Tomlinson (themarcustomlinson_at_[hidden])
Date: 2024-11-29 11:58:00
Iâm aware that the current implementation of any intentionally avoids copy assignments and uses only copy construction for all value updates. I believe this is due to the fact that copy assignment isnât always available for all types - understandable.
My proposal is what if we had a separate âfast-anyâ type that does utilise copy assignment when types match. In my own usage of this new type, Iâve found massive (roughly 2x) performance improvement on consecutive assignments of the same type.
Iâd like to gauge whether there would be any interest in adding such a type to the Boost library.
Source code: https://github.com/cross-platform/fast_any
Regards,
Marcus Tomlinson
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk