Comment

Comment by zahlman

> the compiler had enough static information to emit a single arraylength bytecode instruction.

I'm skeptical.

If it can prove that the input actually matches the hint, then why does it need the hint?

If it can't, what happens at runtime if the input is something else?

> We replaced a complex chain of method calls with one CPU instruction.

JVM bytecodes and CPU instructions really shouldn't be conflated like that, although I assume this was just being a bit casual with the prose.

parent zahlman 8 months ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton