And I got a free moment while waiting for something, so hey, a C++ version using the high_resolution_clock (generally the slowest yay)!
Here is just C++'s since I don’t want to wait for the rest to run:
─➤ ./test_cpp
7628.14
╰─➤ cat test.cpp
#include <iostream>
#include <chrono>
int main() {
using namespace std::chrono;
int interval = 20;
high_resolution_clock::time_point end = high_resolution_clock::now() + seconds(20);
int n = 0;
while((end - high_resolution_clock::now()).count() > 0.0) n += 1;
std::cout << (n / 20000.0) << std::endl;
return 0;
}
Ooo lookie here, C++ is almost as slow as Elixir’s! The BEAM VM uses a very high resolution timer too. ![]()


















