The 128-arm pattern dispatch problem and how we got from 11ns to 1.1ns
The problem Pattern matching on a large set of literal values looks clean in code but hits a wall at runtime. Every on() call constructs case objects for every arm. With 128 arms, that is 128 object constructions per match call. At 11ns per call, this is fine for one-off use. Inside a hot loop, it
ORIGINAL SOURCE →via Dev.to
ADVERTISEMENT
⚡ STAY AHEAD
Events like this, convergence-verified across 689 sources, land in your inbox every Sunday. Free.
GET THE SUNDAY BRIEFING →RELATED · natural
- [NATURAL] Partnerships & Stakeholders: Science and Technology Community
- [NATURAL] Happy #Stunday!! A bit of drama in the sky as the storm loses its grip. #Photography #EastCoastKin
- [NATURAL] #Birds Alan H @alan678.bsky.social says today's #BirdOfTheDay alt theme is #RockSolid any bird captured, perched on…
- [NATURAL] Storm-force winds and high seas forecast over western Atlantic as offshore low rapidly intensifies
- [NATURAL] M 5.1 - 111 km SW of Turpan, China
- [NATURAL] Thousands displaced and at least six dead as heavy rains hit Brazil