by einpoklum · 1y ago · 0 comments
println!("{} is {} years old", person.name, person.age);
with C++: cout << person.name << " is " << unsigned(person.age)
<< " years old" << endl;
... while C++ actually has: println("{} is {} years old", person.name, person.age);
essentially identical to Rust. See: https://en.cppreference.com/w/cpp/io/printlnTrue, but Hylo is so new that it's not even an established language. Plus using this should serve to higlight the differences the author actually cares about between the languages.
What machine / compiler are you on where the difference between these are 30 seconds? GCC is also quite a bit faster based off a quick tests in godbolt.
That is 50% increase.
Still, even (C) printf would have been better than the iostreams monstrosity.