每秒能造多少字符串?这道微基准题藏着实打实的性能黑洞
原创
每秒能造多少字符串?听起来像程序员的自嗨游戏,但 Dan Lemire 这篇帖子让我重新审视了日常最不起眼的操作。字符串拼接——每天都在写、每天都在跑——到底有多少性能被白白浪费?Lemire 用极致的微基准测试把这件事扒了个底朝天:不同语言、不同策略,每秒能生成的字符串数量差距大到离谱。我判断,绝大多数团队从来没认真量过这个指标,因为"能跑就行"。可当千万级字符串往生产系统里一塞,选错拼接方式烧掉的时间和能耗,远比想象中大。
原文:How many strings can you create per second? · 来源:Hacker News
版权声明
所有资源都来源于爬虫采集,如有侵权请联系我们,我们将立即删除
相关文章
- 0.05ms 往返:localhost 为什么不能直接当网站?
- Fornax's Guide to Fast Ethernet
- Possibly leaked NSA Cyberattack tool behind attacks (2017)
- Steve Wozniak on Writing Apple Integer Basic
- PayByPhone is stealing $50M/year from their users
- Grand Theft Auto 6: A Landmark Achievement That Redefines a Console Generation
- Research Acceleration: The Jagged Frontier
- Google Embraces Geothermal Technology to Vaporize Rock for Clean Power
- Microsoft's Agent Framework PyPI package compromised to steal credentials
- Nvidia's Seven Billionaires Have Lost a Third of Their Wealth
最新文章
- 0.05ms 往返:localhost 为什么不能直接当网站? 2天前
- Fornax's Guide to Fast Ethernet 2天前
- Possibly leaked NSA Cyberattack tool behind attacks (2017) 2天前
- Steve Wozniak on Writing Apple Integer Basic 2天前
- PayByPhone is stealing $50M/year from their users 2天前
- Grand Theft Auto 6: A Landmark Achievement That Redefines a Console Generation 2天前
- Research Acceleration: The Jagged Frontier 2天前
- Google Embraces Geothermal Technology to Vaporize Rock for Clean Power 2天前
- Microsoft's Agent Framework PyPI package compromised to steal credentials 2天前
- Nvidia's Seven Billionaires Have Lost a Third of Their Wealth 2天前
itfan123






