Xerox PARC chip shatters on command
Xerox PARC developed a chip that can shatter on command, demonstrating advanced materials technology. The chip's ability to break easily could have applications in security and safety systems. (techxplore.com)
The write-up presents fast SIMD implementations of CLZ (count leading zeros) and CTZ (count trailing zeros) using bit-level and floating-point tricks to avoid scalar instructions. For CLZ, a 64-bit double exponent trick embeds a 32-bit input into a double’s mantissa, subtracts a biased power-of-two, and extracts the exponent to compute clz; this requires 64-bit floats so it only works up to 52-bit inputs. The author shows the AVX assembly sequence, reports throughput gains (e.g., Haswell ~0.45 ns/iter vs 1 ns scalar, Alder Lake ~0.29 ns/iter), and notes platform caveats (AMD’s cheap lzcnt and AVX-512 vplzcntd as alternatives).
For CTZ, the primary approach isolates the low set bit with x xor (x−1), then uses a similar double-exponent trick with carefully chosen bit-mixed constants to avoid subnormals and to handle x=0; the AVX code and measured latencies are given (Haswell ~0.49 ns/iter, Alder Lake ~0.35 ns/iter). Added alternatives include a vectorized de Bruijn method using vpshufb and a magic multiplier (0xf0a6f0a7) that doubles throughput and a 64-bit specialized solution using pshufb plus vpsadbw to compute per-byte inverted popcounts, returning ctz(0)=64 at ~0.63 ns on Haswell. The write-up compares these options, discusses instruction choices (vpternlogq, vpopcntd) and trade-offs across CPU microarchitectures.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.
Xerox PARC developed a chip that can shatter on command, demonstrating advanced materials technology. The chip's ability to break easily could have applications in security and safety systems. (techxplore.com)
Wes Bos hacked inexpensive smart photo frames by rooting them, removing pre-installed software, and installing custom web dashboards. This allows users to repurpose the devices for family organizers and other personalized functions. (wesbos.com)
China's delivery robots are being upgraded to operate effectively during night shifts. These robots are designed to navigate urban environments and deliver packages around the clock. (bloomberg.com)
Reverse engineering a commercial spatial audio effect involved analyzing its filter behavior and impulse responses instead of internal algorithms. This approach enabled recreation of the effect on Linux, enhancing understanding of spatial audio processing. (epestr.com)
A project demonstrates a GameBoy emulator running on an ESP32 with e-paper display at 30FPS. The setup showcases low-power, portable gaming using DIY hardware. (youtube.com)
Many users prefer open-source routers like DD-WRT, but existing options are often secondhand or costly. Building a dedicated open-source router faces challenges in cost, manufacturing, and consumer trust. (news.ycombinator.com)
Today's best Hacker News stories, summarized and screenshotted, one email a day.