how much faster is ASM output vs. printf(),cout,echo,etc...

This is a discussion on how much faster is ASM output vs. printf(),cout,echo,etc... within the A Brief History of Cprogramming.com forums, part of the Community Boards category; if it is faster, is it worth it to use ASM for this?...

well, i havent tested with ASM yet because i dont have time right now, but i did a quick test with C++, and in a loop of 76000 iterations, it takes 12 seconds to go through every iteration and output a single char every time.

now take out the output statement....it takes less than a millisecond to do all 76000 iterations...

so that gives you an idea of how fast printf/cout are (it was 12 seconds for both ways of outputting).

i would post times for ASM...but i dont have much time right now...i have to go...

Therin lies the power of assembly. YOu use what you want and that's all. You can get any better than ASM as far as power goes. The only draw back is that it's hard. you'll have to do all the code your self, no using header files and stuff, and you write a lot more code, etc..

If you're programming for something that has a high level language compiler/interpreter available that produces code that can output text with the intention of being read quicker than it's physically possible to read, then this code will never be your bottleneck.

In this situation, there would be no case for using assembly to make it faster. Anybody who claims differently must have been driven mad by the power they've obtained by using it, and might need to enter an institution for a short while.