Growing India News, world news, nation news, our news, people's news, grow news, entertainment, fashion, movies, tech, automobile and many more..
Saturday, April 19, 2025
Show HN: (bits) of a Libc, Optimized for Wasm https://ift.tt/R0UBPxi
Show HN: (bits) of a Libc, Optimized for Wasm I make a no-CGO Go SQLite driver, by compiling the amalgamation to Wasm, then loading the result with wazero (a CGO-free Wasm runtime). To compile SQLite, I use wasi-sdk, which uses wasi-libc, which is based on musl. It's been said that musl is slow(er than glibc), which is true, to a point. musl uses SWAR on a size_t to implement various functions in string.h. This is fine, except size_t is just 32-bit on Wasm. I found that implementing a few of those functions with Wasm SIMD128 can make them go around 4x faster. Other functions don't even use SWAR; redoing those can make them 16x faster. Smooth sort also has trouble pulling its own weight; a Shell sort seems both simpler and faster, while similarly avoiding recursion, allocations and the addressable stack. I found that using SIMD intrinsics (rather than SWAR) makes it easier to avoid UB, but the code would definitely benefit from more eyeballs. See this for some benchmarks on both x86-64 and Aarch64: https://ift.tt/YAILTgO... https://ift.tt/2IVKtrd April 18, 2025 at 11:36PM
Subscribe to:
Post Comments (Atom)
Show HN: Nocturne – Your Car Thing's Second Chapter https://ift.tt/Xf2ojAy
Show HN: Nocturne – Your Car Thing's Second Chapter Hello HN! Recently, we have released Nocturne 3.0.0, which is a complete replacement...
-
Show HN: An AI logo generator that can also generate SVG logos Hey everyone, I've spent the past 2 weeks building an AI logo generator, ...
-
Breaking #FoxNews Alert : Number of dead rises after devastating tornadoes, Kentucky governor announces — R Karthickeyan (@RKarthickeyan1)...
-
Show HN: Snap Scope – Visualize Lens Focal Length Distribution from EXIF Data https://ift.tt/yrqHZtDShow HN: Snap Scope – Visualize Lens Focal Length Distribution from EXIF Data Hey HN, I built this tool because I wanted to understand which...
No comments:
Post a Comment