Elektrine lite

← Feed

@TomF@mastodon.gamedev.place

Post #2716233

2026-04-25 00:23 UTC

@MartyFouts@mastodon.online OK, well you're entitled to your opinion. But I find it reasonable, practical, and extremely useful to do these things. Just writing code in a language and blindly assuming "the compiler will figure it all out" is, in my experience, in multiple languages, how you end up with slow ugly code.

Replies (2)

  • @TomF@mastodon.gamedev.place 2026-04-25 00:29

    @MartyFouts@mastodon.online To clarify - I don't mean you should *actually* know what the compiler is going to do. That is hard, and most compilers don't actually go through those intermediate stages. I mean that when you're writing a piece of code in a language, you should be able to *in theory* write the same code using the next simpler language. Now, you're choosing not to do that for efficiency - but you COULD. And knowing what that version would look like will inform how you write the real code.

    Open ##2716234

  • @MartyFouts@mastodon.online 2026-04-25 01:12

    @TomF@mastodon.gamedev.place Ironically, some of the slowest ugliest code I have had to debug is in compilers. 😉 But as Knuth pointed out long ago, the fastest way to slow code is premature optimization (but that’s far from the point of this discussion.)

    Open ##2716236