Live data from Hacker News

Zpdf: PDF text extraction in Zig

github.com

11–20 of 88 posts

Re: Zpdf: PDF text extraction in Zig

#11

excellent stuff what makes zig so fast

Not being slow - they compile straight to bytecode, they aren't interpreted, and have aggressive, opinionated optimizations baked in by default, so it's even faster than compiled c (under default conditions.)

Contrasted with python, which is interpreted, has a clunky runtime, minimal optimizations, and all sorts of choices that result in slow, redundant, and also slow, performance.

The price for performance is safety checks, redundancy, how badly wrong things can go, and so on.

A good compromise is luajit - you get some of the same aggressive optimizations, but in an interpreted language, with better-than-c performance but interpreted language convenience, access to low level things that can explode just as spectacularly as with zig or c, but also a beautiful language.

Re: Zpdf: PDF text extraction in Zig

#12
post #2

I built a PDF text extraction library in Zig that's significantly faster than MuPDF for text extraction workloads. ~41K pages/sec peak throughput. Key choices: memory-mapped I/O, SIMD string search, parallel page extraction, streaming output. Handles CID fonts, incremental updates, all common compression filters. ~5,000 lines, no dependencies, compiles in Why it's fast: - Memory-mapped file I/O (no read syscalls) - Z…

What's fast about mmap?

Re: Zpdf: PDF text extraction in Zig

#14
post #2

I built a PDF text extraction library in Zig that's significantly faster than MuPDF for text extraction workloads. ~41K pages/sec peak throughput. Key choices: memory-mapped I/O, SIMD string search, parallel page extraction, streaming output. Handles CID fonts, incremental updates, all common compression filters. ~5,000 lines, no dependencies, compiles in Why it's fast: - Memory-mapped file I/O (no read syscalls) - Z…

You've released quite a few projects lately, very impressive. Are you using LLMs for parts of the coding? What's your work flow when approaching a new project like this?

> Are you using LLMs for parts of the coding?

I can't talk about the code, but the readme and commit messages are most likely LLM-generated.

And when you take into account that the first commit happened just three hours ago, it feels like the entire project has been vibe coded.

Re: Zpdf: PDF text extraction in Zig

#15
post #2

I built a PDF text extraction library in Zig that's significantly faster than MuPDF for text extraction workloads. ~41K pages/sec peak throughput. Key choices: memory-mapped I/O, SIMD string search, parallel page extraction, streaming output. Handles CID fonts, incremental updates, all common compression filters. ~5,000 lines, no dependencies, compiles in Why it's fast: - Memory-mapped file I/O (no read syscalls) - Z…

You've released quite a few projects lately, very impressive. Are you using LLMs for parts of the coding? What's your work flow when approaching a new project like this?

Claude Code.

Re: Zpdf: PDF text extraction in Zig

#16
- First commit 3hours ago.

- commit message: LLM-generated.

- README: LLM-generated.

I'm not convinced that projects vibe coded over the evening deserve the HN front page…

Edit: and of course the author's blog is also full of AI slop…

2026 hasn't even started I already hate it.

Re: Zpdf: PDF text extraction in Zig

#17

- First commit 3hours ago. - commit message: LLM-generated. - README: LLM-generated. I'm not convinced that projects vibe coded over the evening deserve the HN front page… Edit: and of course the author's blog is also full of AI slop… 2026 hasn't even started I already hate it.

Wait, but why?

If it's really better than what we had before, what does it matter how it was made? It's literally hacked together with the tools of the day (LLMs) isn't that the very hacker ethos? Patching stuff together that works in a new and useful way.

5x speed improvements on pdf text extraction might be great for some applications I'm not aware of, I wouldn't just dismiss it out of hand because the author used $robot to write the code.

Presumably the thought to make the thing in the first place and decide what features to add and not add was more important than how the code is generated?

Re: Zpdf: PDF text extraction in Zig

#18

excellent stuff what makes zig so fast

Not being slow - they compile straight to bytecode, they aren't interpreted, and have aggressive, opinionated optimizations baked in by default, so it's even faster than compiled c (under default conditions.) Contrasted with python, which is interpreted, has a clunky runtime, minimal optimizations, and all sorts of choices that result in slow, redundant, and also slow, performance. The price for performance is safety…

will add this to the list, now learning new languages is less of a barrier with LLMs

Re: Zpdf: PDF text extraction in Zig

#19
post #10
post #5

very nice, it'd be good to see a feature comparison as when I use mupdf it's not really just about speed, but about the level of support of all kinds of obscure pdf features, and good level of accuracy of the built-in algorithms for things like handling two-column pages, identifying paragraphs, etc. the licensing is a huge blocker for using mupdf in non-OSS tools, so it's very nice to see this is MIT python bindings…

added a comparison, will improve further. https://github.com/Lulzx/zpdf?tab=readme-ov-file#comparison-... also, added python bindings.

thanks, claude, I guess haha

as others have commented, I think while this is a nice portfolio piece, I would worry about its longevity as a vibe coded project

Re: Zpdf: PDF text extraction in Zig

#20

Earlier quoted context omitted.

You've released quite a few projects lately, very impressive. Are you using LLMs for parts of the coding? What's your work flow when approaching a new project like this?

> Are you using LLMs for parts of the coding? I can't talk about the code, but the readme and commit messages are most likely LLM-generated. And when you take into account that the first commit happened just three hours ago, it feels like the entire project has been vibe coded.

Hard disagree. Initial commit was 6k LOC. Author could've spent years before committing. Ill advised but not impossible.
Post reply on HN