points by captainmuon 1 day ago | 0 comments
It's cool that you can do this now with constexpr instead of a pre-build step. The idea is pretty old though. I remember reading an article in a computer magazine in the 90s about how a web browser (Mozilla) works. They made a big point about how difficult parsing tags is, and that you can't just `if tag == "HTML"` for performance reasons. Instead they pre-baked an optimal hash table and used that. I remember it vividly because that was my first contact with hash tables and the explanation was pretty good. Looking back I find it funny that they considered tag lookup the hard part of a browser :-).
Aún no hay comentarios.