frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Devirtualization and Static Polymorphism

https://david.alvarezrosa.com/posts/devirtualization-and-static-polymorphism/
20•dalvrosa•3h ago

Comments

pjmlp•53m ago
Nice overview, it misses other kinds of dispatch though.

With concepts, templates and compile time execution, there is no need for CRTP, and in addition it can cover for better error messages regarding what methods to dispatch to.

dalvrosa•28m ago
Fair. New C++ standards are providing great tools for compile-time everything

But still CRTP is widely used in low-latency environments :)

hinkley•31m ago
I wonder if I still have the link.

One of the papers I had bookmarked when toying with my own language design was someone that had worked out how to make interfaces as fast or faster than vtables by using perfect hashing and using the vtable as a hash table instead of a list.

You can also, when inlining a polymorphic call, put a conditional block in that bounces back to full dispatch if the call occasionally doesn’t match the common case. The problem with polymorphic inlining though is that it quickly resembles the exact sort of code we delete and replace with polymorphic dispatch:

    if (typeof arg1 == “string”) {
    } else if typeof arg1 === …) {
    } else if {
    } else if {
    } else {
    }
dalvrosa•24m ago
Nice one, TIL

One caveat with "hash vtables" is that you only really see a performance win when the interface has a lot of specializations.

anitil•5m ago
I've been thinking through what features I'd want in a language if I were designing one myself, and one of my desires is to have exhaustive matches on enums (which could be made of any primitive type) and sum types. The ability to generate perfect hashes at compile time was one of the things that falls out nicely from that
TimorousBestie•6m ago
Good article, rare to see simple explanations of intricate C++ ideas.
gignico•4m ago
> Under the hood, a virtual table (vtable) is created for each class, and a pointer (vptr) to the vtable is added to each instance.

Coming from C++ I assumed this was the only way but Rust has an interesting approach where the single objects do not pay any cost because virtual dispatch is handled by fat pointers. So you carry around the `vptr` in fat pointers (`&dyn MyTrait`) only when needed, not in every instance.

Jimi Hendrix was a systems engineer

https://spectrum.ieee.org/jimi-hendrix-systems-engineer
139•tintinnabula•1h ago•58 comments

The Om Programming Language

https://www.om-language.com/
198•tosh•4h ago•34 comments

Making MCP cheaper via CLI

https://kanyilmaz.me/2026/02/23/cli-vs-mcp.html
39•thellimist•1h ago•33 comments

Bus stop balancing is fast, cheap, and effective

https://worksinprogress.co/issue/the-united-states-needs-fewer-bus-stops/
246•surprisetalk•5h ago•399 comments

Windows 11 Notepad to support Markdown

https://blogs.windows.com/windows-insider/2026/01/21/notepad-and-paint-updates-begin-rolling-out-...
107•andreynering•5h ago•216 comments

Dissecting the CPU-memory relationship in garbage collection (OpenJDK 26)

https://norlinder.nu/posts/GC-Cost-CPU-vs-Memory/
14•jonasn•1d ago•5 comments

Large-Scale Online Deanonymization with LLMs

https://simonlermen.substack.com/p/large-scale-online-deanonymization
142•DalasNoin•1d ago•135 comments

Show HN: Respectify – A comment moderator that teaches people to argue better

https://respectify.org/
29•vintagedave•7h ago•61 comments

Access to a Shared Unix Computer

http://tilde.club/
20•TigerUniversity•3d ago•5 comments

Learnings from 4 months of Image-Video VAE experiments

https://www.linum.ai/field-notes/vae-reconstruction-vs-generation
21•schopra909•1d ago•3 comments

Following 35% growth, solar has passed hydro on US grid

https://arstechnica.com/science/2026/02/final-2025-data-is-in-us-energy-use-is-up-as-solar-passes...
320•rbanffy•5h ago•236 comments

Why isn't LA repaving streets?

https://lapublicpress.org/2026/02/why-isnt-la-repaving-streets/
55•speckx•5h ago•105 comments

Show HN: I ported Tree-sitter to Go

https://github.com/odvcencio/gotreesitter
146•odvcencio•3h ago•59 comments

How to fold the Blade Runner origami unicorn (1996)

https://web.archive.org/web/20011104015933/www.linkclub.or.jp/~null/index_br.html
229•exvi•2d ago•31 comments

The Misuses of the University

https://www.publicbooks.org/the-misuses-of-the-university/
99•ubasu•5h ago•68 comments

Trellis AI (YC W24) is hiring deployment lead to accelerate medication access

https://www.ycombinator.com/companies/trellis-ai/jobs/7ZlvQkN-lead-deployment-strategist
1•macklinkachorn•5h ago

GNU Texmacs

https://www.texmacs.org/tmweb/home/welcome.en.html
96•remywang•6h ago•33 comments

Never buy a .online domain

https://www.0xsid.com/blog/online-tld-is-pain
621•ssiddharth•8h ago•372 comments

PA Bench: Evaluating Frontier Models on Multi-Tab Pa Tasks

https://vibrantlabs.com/blog/pa-bench
7•shahules•2h ago•2 comments

Devirtualization and Static Polymorphism

https://david.alvarezrosa.com/posts/devirtualization-and-static-polymorphism/
20•dalvrosa•3h ago•7 comments

The First Fully General Computer Action Model

https://si.inc/posts/fdm1/
40•nee1r•2d ago•23 comments

Launch HN: TeamOut (YC W22) – AI agent for planning company retreats

https://app.teamout.com/ai
33•vincentalbouy•8h ago•39 comments

New accounts on HN more likely to use em-dashes

https://www.marginalia.nu/weird-ai-crap/hn/
516•todsacerdoti•7h ago•443 comments

Claude Code Remote Control

https://code.claude.com/docs/en/remote-control
441•empressplay•14h ago•257 comments

Text-Based Google Directions

https://gdir.telae.net/
41•TigerUniversity•4d ago•14 comments

US orders diplomats to fight data sovereignty initiatives

https://www.reuters.com/sustainability/boards-policy-regulation/us-orders-diplomats-fight-data-so...
383•colinhb•7h ago•310 comments

Show HN: Django Control Room – All Your Tools Inside the Django Admin

https://github.com/yassi/dj-control-room
95•yassi_dev•7h ago•46 comments

Danish government agency to ditch Microsoft software (2025)

https://therecord.media/denmark-digital-agency-microsoft-digital-independence
688•robtherobber•11h ago•351 comments

ECS Survivors Parts VII – X

https://blog.ptidej.net/ecs-survivors-parts-vii-x/
7•yann-gael•1h ago•1 comments

LLM=True

https://blog.codemine.be/posts/2026/20260222-be-quiet/
199•avh3•13h ago•134 comments