News for hackers. Stuff that matters.
Re:Generics can make your Go code slower by jerf on Wednesday March 30, 2022 @03:49PM (#30859977)
If your data is "mostly a tree but has the occasional back reference I can easily identify as a back reference", that works great and I've used it in other languages.

But in the limit, as your data becomes maximally "graphy" and there isn't much you can do about it, this ceases to be a viable option. You have to be able to carve a "canonical tree" out of your graph for this to work and that's not always possible. (Practically so, I mean. Mathematically you can always define a tree, by simple fiat if nothing else, but that doesn't help if the only available definitions are not themselves practical.)

Re:Generics can make your Go code slower by nu11ptr on Wednesday March 30, 2022 @03:52PM (#30859994)
Fair point - so far I've been lucky enough to avoid such use cases