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/0iPeAb3... [2] https://ift.tt/nYcDsBK... [3] https://ift.tt/C0QEkYj... https://ift.tt/9iDytOh October 12, 2024 at 11:56PM
Show HN: SSO – Small String Optimization https://ift.tt/dpOXnL1
Related Articles
Show HN: Clop – optimise screenshots and recordings automatically https://ift.tt/6Os4lLzShow HN: Clop – optimise screenshots and recordings automatically http… Read More
Show HN: Pho – Phonetic Alphabet Renderer in Rust https://ift.tt/VmoNp1FShow HN: Pho – Phonetic Alphabet Renderer in Rust https://ift.tt/zekL1… Read More
Show HN: Weaviate – Multi Tenancy Notebook https://ift.tt/83tpiK1Show HN: Weaviate – Multi Tenancy Notebook https://ift.tt/U5fwdAb Augu… Read More
Show HN: Open-source proxy server for Llama2, GPT-4, Claude2 with Logging,Cache https://ift.tt/MZFkmL3Show HN: Open-source proxy server for Llama2, GPT-4, Claude2 with Logg… Read More
Show HN: Covert – Rewrite of HashiCorp Vault Using Rust, SQLite and Litestream https://ift.tt/ab5zcniShow HN: Covert – Rewrite of HashiCorp Vault Using Rust, SQLite and Li… Read More
Show HN: VectorFlow – Open-Source Vector Embedding Pipeline https://ift.tt/HluU3vbShow HN: VectorFlow – Open-Source Vector Embedding Pipeline Hey HN We'… Read More
Show HN: Tetris, but the blocks are ARM instructions that execute in the browser https://ift.tt/Y49SeGRShow HN: Tetris, but the blocks are ARM instructions that execute in t… Read More
Show HN: Run LLaMa2 on the Browser with Ggml.js https://ift.tt/RUNpDFvShow HN: Run LLaMa2 on the Browser with Ggml.js You can now build serv… Read More
0 Comments: