flat assembler
Message board for the users of flat assembler.
![]() Goto page Previous 1, 2, 3, 4 |
Author |
|
JohnFound 11 May 2012, 17:08
Another round of the battle ended. My opponent left the OOP off and turned to the linear C-like dirty code with static inline functions (I am not sure about the proper C terminology): here you can read the source
My code, on the other hand, became streamlined, faster and smaller. ![]() The Windows executable is now only 2560bytes. The benchmark demonstrates the rough power of assembly: Code: ptime --r12 --alh "cmd /c markdown < test.md > test.html" time: elapsed: 2781ms, kernel: 31ms, user: 6ms ptime --r12 --alh "cmd /c MarkdownVader_11_05_2012 < test.md > test2.html" time: elapsed: 4868ms, kernel: 60ms, user: 12ms For comparison, on the same computer, "copy test.md test2.md" takes 2000ms. |
|||
![]() |
|
Enko 11 May 2012, 22:30
My knowledge of c/cpp is very limited. But as I remember, "templetes" are just another aproach of OOP. (like the STL)
For "static" and "static inline" no idea of the benefit. They are directives I think for the linker, but have no idea why or if they do afect the speed. But yes, the codes looks much more like C code. I guess its the first step for optimization. This would be the steps: 0)Write CPP Code 1)Wirte the same code but now with C 2)Write asm inline functions in the C code 3)Rewrite all the stuff in asm ![]() By the way JohnFound, your code is more easier to read. I guess for the coments, and the labels. dvader has no comments at all. pd: I read the thread, and actually, you to make a joke about __asm inline ![]() |
|||
![]() |
|
Goto page Previous 1, 2, 3, 4 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.