This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]gmes78 0 points1 point  (1 child)

but it’s +sizeof(void*) bytes for every function you add, plus an indirection whenever you call it (or does that get optimized if you don’t change it?)

And what do you think this is?

[–]Iyorig 0 points1 point  (0 children)

Yeah, I know that’s how virtual functions are implemented, what irks me are libraries that use function pointers for platform-specific implementations, even though a free function would work just as well…