“Hello world” is slower in C++ than in C (Linux)

“Hello world” is slower in C++ than in C (Linux).
A simple C program might print ‘hello world’ on screen: #include <stdio.h> #include <stdlib.h> int main() { printf(hello world\n); return EXIT_SUCCESS; } You can write the equivalent in C++: #include #include <stdlib.h> int main() { std::cout << hello world << std::endl; return EXIT_SUCCESS; } How fast do these programs run? We can check using … Continue reading “Hello world” is slower in C++ than in C (Linux)

Read in full here:

This thread was posted by one of our members via one of our news source trackers.

Corresponding tweet for this thread:

Share link for this tweet.