3 ms·
Dynamic dispatch is not a hard thing. And in fact the article treats dynamic dispatch as being too simple to be worthy of discussion. The article is about the s
by brucedawson 10y ago
Dynamic dispatch is not a hard thing. And in fact the article treats dynamic dispatch as being too simple to be worthy of discussion. The article is about the subtle problems that can happen after you have dynamically dispatched.
How do you think that compilers and linkers should handle the problems of non-inlined inline functions in the face of /arch:AVX? Saying that it should not even be a hard thing doesn't help much.
- flamedoge 10y agoThe way the author is using it to generate both AVX and non-AVX code is such a hack that I find it hard to believe it even worked. It is literally a ticking time bomb that depends on compiler's inliner heuristics to trigger. Compilers and linkers should be able to generate and optimize different code paths -- it shouldn't have to take hacking and tinkering with tools to do something. To make it sound worse, that something isn't even guaranteed to be safe even with hacky build. Literally the only two things it takes to do this are a conditional check based on CPUID result and CodeGen support for generating multiple Arch paths. If you have those two, multi-version function is very likely to work with safety. Edit: oh, you are the author. I hope you weren't offended. I meant none.