Closed jrouwe closed 4 months ago
There comes a time when a man has to write their own array class.
Congratulations for this very important achievement :-)
Yeah, I kept telling myself: std::vector is not that bad and I'll use it until it gets in the way of performance. Unfortunately, I recently learned that std::vector memsets the entire datablock to 0 before doing anything else and there doesn't appear to be a reasonable way around it. This was actually costing quite a bit of time when deserializing big meshes/height fields. And due to my self imposed restrictions that I cannot use 3rd party libs other than STL, I had to write my own 😞
There comes a time when a man has to write their own array class. Congratulations for this very important achievement :-)
Yeah, I kept telling myself: std::vector is not that bad and I'll use it until it gets in the way of performance. Unfortunately, I recently learned that std::vector memsets the entire datablock to 0 before doing anything else and there doesn't appear to be a reasonable way around it. This was actually costing quite a bit of time when deserializing big meshes/height fields. And due to my self imposed restrictions that I cannot use 3rd party libs other than STL, I had to write my own 😞
Yeah, been there, done that (for pretty much the entire STL). It's really sad that the STL is barely usable once you actually care about performance. But well, nothing else one can do about, I guess.
Issues
0 New issues
12 Accepted issues
Measures
0 Security Hotspots
19.4% Coverage on New Code
0.0% Duplication on New Code
There comes a time when a man has to write their own array class.
Congratulations for this very important achievement :-)