Saturday, October 12, 2024
Show HN: SSO – Small String Optimization https://ift.tt/hmZdEPD
Show HN: SSO – Small String Optimization I wrote this just for fun when saw article about sso in Rust[1]. My string can store up to 23 (excluding null-terminator) 8-bit chars without calling allocator. Here I can mistake, but.. Curious fact: both - libstdc++[2] and libc++[3] - do access to union member without any check that it is active now. AFAIK, this is UB in C++. But I assume that they just rely on theirs compiler features. I tried to avoid this using `std::byte[]`. But I'm still sure that there are several UB's in my code :) [1] https://ift.tt/zMROFXH... [2] https://ift.tt/dEjUFfQ... [3] https://ift.tt/lV2dnjA... https://ift.tt/YJMbSIZ October 12, 2024 at 11:56PM
Subscribe to:
Post Comments (Atom)
Show HN: Built QR-code SaaS with 30% recurring commission-open to early partners https://ift.tt/xgmbC5U
Show HN: Built QR-code SaaS with 30% recurring commission-open to early partners Hey HN, I’m from QR Code Developer, a simple SaaS tool for ...
-
Show HN: High school robotics code/CAD/design binder release Hello HN! My name is Patrick, and I am a junior at my High School’s FRC robotic...
-
Show HN: D&D meets Siri – Interactive voice adventure Hey HN! I've been building tooling for voice-driven apps over the past few mon...
-
Show HN: I Made an AI Social Media Manager to Automate Content Creation Hey HN, I am a Solopreneur, and I love building apps to automate bor...
No comments:
Post a Comment