- Joined
- Jun 20, 2001
- Location
- Vancouver, WA
Is there anything quite a bit faster at screen output than 'cout'? Or some way of optimizing how I write to the screen to result in faster outputs?
I've ported over my BASIC prime number program to C++, and it's faster like many people have told me until you make it write to the screen. The writing algorthm used in 'cout' just plain sucks compared to BASIC's 'print'.
Benchies (so you know just how much faster I need to write):
BASIC - 1 to 1 Million (to screen) - 3.571 seconds
C++ - 1 to 1 Million (to screen) - 9.7 seconds
C++ - 1 to 1 Million (no output) - 2.2 seconds
Anything you C++ gurus know of that will speed it up writing to around my BASIC's time?
JigPu
I've ported over my BASIC prime number program to C++, and it's faster like many people have told me until you make it write to the screen. The writing algorthm used in 'cout' just plain sucks compared to BASIC's 'print'.
Benchies (so you know just how much faster I need to write):
BASIC - 1 to 1 Million (to screen) - 3.571 seconds
C++ - 1 to 1 Million (to screen) - 9.7 seconds
C++ - 1 to 1 Million (no output) - 2.2 seconds
Anything you C++ gurus know of that will speed it up writing to around my BASIC's time?
JigPu