Advertisement

Assembly.. how much faster

Started by August 15, 2000 12:57 PM
1 comment, last by jho 24 years, 4 months ago
I have written a small wireframe 3D engine with some vector and matrix math stuff with C++. I was wondering if I port the math code to assembly embedded in C++.. Should I be expecting a noticible difference? Because if it''s only 2%-5% faster. It''s not really worth the time IMO.
You moron, stop asking stupid question just to rank yer fuck.
Advertisement
The main reasons to use ASM are if you need fast fills or copys, because in ASM you can use the MMX or FPU registers (quad-word) to transfer memory faster than rep stosd/movsd which does it only in double words. You can also use MMX instructions, 3DNOW! instructions and SIMD, and gain access to a higher resolution timer, but that is all that ASM can really do for you that plain C++ optimisation can''t. (So not much for a wireframe library. Once you get onto shading and texture mapping though there will probably be greater improvements in speed) Also, when you compile make sure you compile for a pentium pro target rather than a pentium one. And you''ll get an improvement by using ASM if your compiler is a crappy old one and doesn''t do FPU instructions.

------------------------------
#pragma twice

This topic is closed to new replies.

Advertisement