TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

A high-throughput parser for the Zig programming language

146 点作者 jedisct127 天前

5 条评论

ww52027 天前
This is very cool. Extremely fast lexical tokenizer is the basis for a fast compiler. Zig has good integration and support for SIMD operations that&#x27;s perfect for this kind of things. It&#x27;s definitely doable. I did a proof of concept on using SIMD to operate on 32-byte chunk to parse identifiers a while back.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;williamw520&#x2F;misc_zig&#x2F;blob&#x2F;main&#x2F;identifier.zig">https:&#x2F;&#x2F;github.com&#x2F;williamw520&#x2F;misc_zig&#x2F;blob&#x2F;main&#x2F;identifier...</a>
评论 #43710649 未加载
dreamoffire27 天前
The talks that Niles gave at the Utah Zig meetups (linked in the repo) were great, just wished the AV setup was a little smoother. There seemed like there some really neat visualizations that Niles prepared that flopped. Either way, I recommend it. Inspired me to read a lot more machine code these days.
评论 #43749182 未加载
neerajsi27 天前
Very interesting project!<p>I wonder if there&#x27;s a way to make this set of techniques less brittle and more applicable to any language. I guess you&#x27;re looking at a new backend or some enhancements to one of the parser generator tools.
评论 #43707654 未加载
评论 #43710029 未加载
matu3ba27 天前
Would be very cool, if once finished, the techniques are applied to user-schedulable languages <a href="https:&#x2F;&#x2F;www.hytradboi.com&#x2F;2025&#x2F;7d2e91c8-aced-415d-b993-f6f85f6426c1-safe-and-productive-performance-with-user-schedulable-languages" rel="nofollow">https:&#x2F;&#x2F;www.hytradboi.com&#x2F;2025&#x2F;7d2e91c8-aced-415d-b993-f6f85...</a>.<p>I guess they are too tailored to the actual memory layout with respective memory access delay of the architecture, but I would like to be shown that I am wrong and it is feasible.
评论 #43758833 未加载
asdfman12327 天前
This really moves Zig