News for hackers. Stuff that matters.

janwas

Re:JPEG XL vs. AVIF for web use-cases on Friday October 16, 2026 @03:04PM (#50122942)
This was indeed what the JPEG XL effort started with :) The Butteraugli metric.
Re:JPEG XL vs. AVIF for web use-cases on Friday October 16, 2026 @03:03PM (#50122914)
There was a large scale study a while back: https://cloudinary.com/blog/contemplating-codec-comparisons
Re:Platform-Independent SIMD in Go on Friday September 25, 2026 @01:45PM (#49847728)
Re:Platform-Independent SIMD in Go on Friday September 25, 2026 @01:44PM (#49847715)
We pioneered this in Highway and shared some advice on the API. Great to see this decision taken :D
Re:Fearless SIMD v1.0 is here on Friday September 25, 2026 @08:17AM (#49843588)
:) Yeah, those are best copy-pasted from existing code.

I do think we've converged on the best that's possible in C++.

Re:Fearless SIMD v1.0 is here on Friday September 25, 2026 @04:30AM (#49841709)
+1 on agents making library/DIY a lot more attractive than bespoke compilers.

In C++, one can also have portable intrinsics plus simpler runtime dispatching using our Highway library :)

Re:Vectorized and performance-portable Quicksort (2022) on Thursday September 17, 2026 @11:31AM (#49742319)
VQSort users include numpy, XLA (for sparse tensors), ScaNN:

https://sourcegraph.com/search?q=context:global+hwy/contrib/...

Re:Vectorized and performance-portable Quicksort (2022) on Thursday September 17, 2026 @05:06AM (#49738185)
(Co-)author here :)

I'd absolutely still use Highway, and do. My experience is that even two separate implementations diverge over time and I'd have low confidence in bringing the same updates and improvements to all, even with LLM assistance.

Our programming model is 1) an agent+human to generate the algorithmic approach, 2) a C++ library (Highway) to translate to intrinsics, while filling in gaps + allowing customization, 3) a compiler to generate the actual code with some optimizations.

Asking the compiler to do #1 is a pipe dream: compiler friends tell me they are not going to devise new shuffles/data layouts (like what VQSort does). Conflating #2 and #3 means a custom compiler/IR which has high engineering costs (ABI boundaries, hard to debug/profile/sanitize). And doing #3 at runtime (JIT), or moving fusions into #3 (MLIR), vastly complicates the compiler. We can still get runtime adaptability thanks to Highway's multi-target support. Fusion has been much easier to implement manually for LLMs than to construct a general fusion infrastructure. Templates hide most data type differences and we see 2-5x speedup vs llama.cpp for 128k prefill+batch decode on Zen5.

Instead of requiring a compiler to do heroic transforms at runtime, and get it right every time, we can do all kinds of agentic exploration, then verify the result/approach, check in the source code, then we 'just' have a C++ compiler afterwards. And if/when something breaks, it's easy to update centrally, in code we can modify directly, rather than indirectly via updating a compiler.

Re:Is JPEG XL too slow for the web? on Wednesday September 16, 2026 @10:19AM (#49727456)
As posted here: https://news.ycombinator.com/item?id=49693906

several years ago, using 6 threads and vectorized C++, we saw about 240-270 MP/s decode speed. Hence this should be possible in < 100ms. Not sure how the current implementation differs from that state :)

Re:The case against JPEG XL on Wednesday September 16, 2026 @05:55AM (#49724149)
> This tells me you don't know how codecs work

Laughable.

My conservative estimate is that a few-MP image with all but a smallish region encoded using skip blocks will spend a few KiB on that. This is very expensive compared to sending only a bounding box, hence it is unattractive for purposes of updating small regions with a whole-image layer.

I am glad to hear AVIF progressive has improved. But note that my original comment was: I find it misleading to call AVIF's "up to four passes" "very flexible". I believe that stands: contrasting the flexibility of (purpose-built) JPEG XL vs. the fairly strict limitations (inherited from video) of AVIF, I am astonished anyone would still call the latter "very flexible" by comparison.

Re:The case against JPEG XL on Tuesday September 15, 2026 @03:36PM (#49717737)
Not at all.

CPU power is proportional to frequency^2. Running on 4-6 little/efficiency cores (which are widespread on mobile) is likely faster than one big core, and uses less energy.

Re:The case against JPEG XL on Tuesday September 15, 2026 @03:16PM (#49717440)
There is indeed an issue with the JPEG format that makes parallelization difficult: the lack of a 'table of contents' with offsets to tiles.

Various workarounds (for example RST markers or self-sychronizing properties of Huffman) have been proposed, but these are not great and do not work for all images.

JPEG XL ensures this information is always available.

Re:The case against JPEG XL on Tuesday September 15, 2026 @03:25AM (#49708973)
I note you made no response to the objection about representing a temporal sequence with a single, nonrepresentative and cherry-picked, screenshot.

As to bad experience, that seems like a legit personal preference, but disturbingly un-nuanced and absolutist if intended to apply to everyone.

When on a train with spotty wifi or frequent tunnels, I would actually prefer to see whatever arrived. Someone on prepaid data might want to truncate at ~100 KB, no matter what the website owner or browser PM thought.

Re:The case against JPEG XL on Tuesday September 15, 2026 @03:15AM (#49708898)
Ah, an accusation of misquoting. I actually quoted your exact words minus "is" and "it supports".

I think we disagree on the degree of flexibility, for sure.

A cap on layers (under user/browser) absolutely makes sense, but 4 at the format level is quite limiting, especially if you want to spend some of them on salient regions.

I agree that's possible, but not that it's efficient. You'd waste a few KiB on encoding skip blocks - AVIF layers represent the whole image, whereas JPEG XL can efficiently encode and update at group level.

How flexible did Jake find AVIF progressive in 2025? [1]

"it seems pretty limited. Only particular scaling values are allowed, and 1/8 is the smallest. Supposedly, additional layers are possible[..], but whenever I tried this, the encoder would error out, or explode the file size to ~400 kB, even at lowest quality. I guess that's why it's marked 'experimental'."

> Intermediate passes in AVIF can semantically be different from the final pass

Also true of JPEG XL - scans are additive.

[1]: https://jakearchibald.com/2025/present-and-future-of-progres...

Re:The case against JPEG XL on Tuesday September 15, 2026 @02:53AM (#49708723)
We can agree on wanting a better internet :)

I participated in the design of those filters, so no, I do not deeply dislike the way they look.

This gaslighting is not convincing. No matter how many filters AVIF has, I distinctly remember tile artifacts being particularly disturbing. More so than individual blocks, whose size and border effects differ; tiles are a straight line through the entire image.

JPEG XL does not have this problem because the design and codestream enables parallel decoding (thanks to per-group offsets encoded in the 'TOC'), hence does not require separate tiles.

Re:The case against JPEG XL on Monday September 14, 2026 @02:09PM (#49701298)
Surprised and disappointed to hear "bad-faith reading".

I have seen AVIF tiling artifacts myself. Hand-waving them away by appealing to a metric that averages across all image pixels is not convincing.

Re:The case against JPEG XL on Monday September 14, 2026 @09:02AM (#49696144)
Sounds like some strong assumptions here, particularly a stable and non-metered connection.

Imagine fast scroll across an image gallery on a slow connection (including cell handovers).

Or range requests, where a service worker only downloads the header+preview portion, and when clicking on the image, no need to re-download that.

Or even a browser that truncates all images, to protect users who might visit a page with huge background images that blows through their prepaid data plan.

JPEG XL anticipated, and accommodates, these use cases.

Re:The case against JPEG XL on Monday September 14, 2026 @05:16AM (#49694038)
I find it misleading to call AVIF's "up to four passes" "very flexible".

It seems quite limited compared to the JPEG XL ability to truncate the bitstream anywhere, or send the progressive updates for salient regions first [1].

[1]: https://opensource.googleblog.com/2021/09/using-saliency-in-...

Re:The case against JPEG XL on Monday September 14, 2026 @05:04AM (#49693931)
+1, this is super unfair to show the one point in time where AVIF progressive looks better - right after it receives its 'preview' (which as you say is 4x as big as JPEG XL's).

I value integrity, especially when communicating results. This is shameful.

(Disclosure: I worked on JPEG XL)

Re:The case against JPEG XL on Monday September 14, 2026 @05:00AM (#49693906)
Something is fishy here.

The JPEG XL report [1] measured between 240-270 Megapixels/s on 6 cores using the C++ implementation (disclosure: I was responsible for its SIMD/threading), about twice as fast as the then-current libaom.

Measuring on a single core is deeply misleading because our code was designed to scale well. I believe AVIF requires tiling in order to parallelize, which causes artifacts at tile boundaries.

[1]: https://arxiv.org/pdf/2506.05987

Re:SIMD Softmax, Neon to WASM, with Google Highway on Monday August 24, 2026 @02:05AM (#49415725)
Great writeup, especially liked the line by line explanation :)

We actually did manage to get dynamic dispatch working in Compiler explorer with Matt's help: https://gcc.godbolt.org/z/KM3ben7ET

Maybe interesting to also refer to Gemma.cpp's version: https://github.com/google/gemma.cpp/blob/dev/ops/ops-inl.h#L...

We recently added a FastExpMinusOrZero, only valid for inputs <= 0, which is true for softmax.

Re:RISC-V: They should have known better on Sunday August 23, 2026 @03:37PM (#49411778)
Not seeing this at all. We routinely and easily target SSE4, AVX2, AVX-512 (in four variants) using the same application code in one binary. Frankly, this seems better to me than four separate RISC-V matmul extensions.
Re:Ask HN: Is it time to run the LLM engines on the CPU? on Sunday August 23, 2026 @01:40PM (#49410762)
The future is already partially here: see the recent "do we still need gpus" article.
Re:Ask HN: Is it time to run the LLM engines on the CPU? on Sunday August 23, 2026 @10:45AM (#49409263)
Not sure what this comment is based on. Arm introduced a scalable SIMD whose whole point is to be expandable. AVX-512 works very well, for example on Zen 4 and 5.
Re:Everyone Should Know SIMD on Thursday July 23, 2026 @02:42PM (#49026234)
That is not at all my experience :) Please expand on what "vertically-oriented scope" means.
Re:GigaToken: ~1000x faster Language model tokenization on Thursday July 23, 2026 @02:37PM (#49026171)
If you are running on large-scale data, have you validated at that scale (comparing results)? From a quick look at the code, it looks like there is a 42-bit hash (computed via single-mul hash function) which can have collisions and thus return the wrong tokens, right?
Re:GigaToken: ~1000x faster Language model tokenization on Thursday July 23, 2026 @01:14AM (#49017220)
hm, maybe not so trivially correct here. Do I understand correctly that incorrect results can happen as a result of a 42-bit hash collision? That could happen after less than one MB of input, given the simple one-mul hash.

BTW throughput is measured for a 12 GiB file. Would be interesting to see the throughput for something more like 32 KiB, with cold start (token cache not yet populated).

Re:We recommend Highway over std:SIMD on Saturday June 13, 2026 @04:34AM (#48514931)
Author/Highway TL here. Happy to discuss.
Re:Bun team is rewriting SIMD from Rust to C++ on Tuesday May 26, 2026 @02:52PM (#48284166)
Impressive result. Congrats!
Re:C++26 Shipped a SIMD Library Nobody Asked For on Monday May 25, 2026 @10:26AM (#48267245)
Oops, the final T got cut off somehow, sorry about that.

https://gcc.godbolt.org/z/KM3ben7ET

Older »