Elektrine lite

← Feed

@Doomed_Daniel@mastodon.gamedev.place

Post #2716221

2026-04-24 19:57 UTC

@JamesWidman@mastodon.social @TomF@mastodon.gamedev.place IMO having a mental model of what vtables are (a pointer to a list of function pointers), where implicit allocation happens (and that heap allocations have real cost), that inlining functions is a thing and when it can (not) or is (un)likely to happen etc already gets you pretty far (see also https://mastodon.gamedev.place/@TomF/116461364931250271 ) even if you don't know how exactly the specific compiler might optimize further with its IR

Replies (1)

  • @JamesWidman@mastodon.social 2026-04-24 20:03

    @Doomed_Daniel@mastodon.gamedev.place @TomF@mastodon.gamedev.place well... yes, but my point was: if the compiler doesn't actually translate to C, then you're not going to be able to check your expectations. So ideally, you want to think in terms of the stuff that it actually generates (so that you can use the compiler's output to correct yourself when you inevitably hit cases where your mental model turns out to be incorrect).

    Open ##2716222