Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, sometimes it is worth to optimize for size, especially if the string is actually not used in any fast path and just need to be there.

I'll mention though that std::string (well, basic_string) takes an allocator parameter, so it could only enable this optimization for 'well known' allocators that provide aligned buffers.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: