I wrote about optimizing the new C++ based Blender OBJ importer, and it accidentally ventured into calling conventions topic.

@aras Great post! I wonder why optimizing compilers/linkers don't try to specialize the calling convention of functions called internally in programs/objects. Or do they?

Of course the GPU programmer in me says: Inline all the things!

@anji good question. I guess without a complete view of "literally everything in the whole program" (super-LTO/LTCG?), they wouldn't know whether something takes an address of a function, for example. Or something like that.

@aras @anji At least for functions marked static it should be possible, right? Like how compilers won't emit static functions that aren't called. But I guess emitting code with a variety of calling conventions is probably a *lot* more complicated than not emitting code at all.

@aras I saw your teaser for the parser shootout. Will you consider including the parser in Intel Embree? We’re using it because it’s the default. It would be nice to see if it’s worth replacing.

@aras Great article, thank you! I enjoy your #Blender optimization series a lot :)

Sign in to participate in the conversation
Gamedev Mastodon

Mastodon server focused on game development and related topics.