R9 5950X using AnimRay commit 729370df6ba0220fe55a506c462acfd19d0b942a
$ uname -a
Linux vangogh 5.11.0-17-generic #18-Ubuntu SMP Thu May 6 20:10:11 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
"spheres-white.tga" 1920x1080 225/225 (128x72)
"spheres-white.tga" 1920x1080 225/225 (128x72)
"spheres-white.tga" 1920x1080 225/225 (128x72)
"spheres-white.tga" 1920x1080 225/225 (128x72)
"spheres-white.tga" 1920x1080 225/225 (128x72)
Performance counter stats for './build.tmp/clang-release/scenes/early/spheres-white -w 1920 -h 1080 -c 100 -s 20' (5 runs):
// clang++ -O3 time.cpp -o ttt | |
#include <chrono> | |
#include <iostream> | |
int main() { | |
auto last = std::chrono::duration_cast<std::chrono::nanoseconds>( | |
std::chrono::system_clock::now().time_since_epoch()).count(); | |
while(true) { |
/** | |
# Look for 32 byte collisions from urandom. | |
Compile with: | |
``` | |
clang++ urandom.cpp -std=c++17 -O3 -o urandom -Werror | |
``` | |
*/ |
/// # Build me a LISP | |
// Read this nicely formatted at https://kirit.com/Build%20me%20a%20LISP | |
/** | |
Normally programming language blog posts get started with grammars and syntax | |
and parsing and all sorts of stuff like that. I can't be bothered with all of | |
that, so instead, let's start with the (maybe more interesting aspect) of the | |
actual evaluation of the code. Here we'll build an evaluation engine for LISP | |
like languages in less than 50 lines of C++ -- [and literate C++ at |
/* | |
* A generator. Initial code taken from N4649 p15 | |
* http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/n4649.pdf | |
*/ | |
#include <experimental/coroutine> | |
#include <iostream> | |
// Compile with: | |
// clang++ --std=c++14 -O3 -o pi pi.cpp | |
#include <algorithm> | |
#include <cmath> | |
#include <experimental/iterator> | |
#include <iomanip> | |
#include <iostream> | |
#include <iterator> | |
#include <type_traits> |
#ifdef DEBUG | |
inline void check(const auto &b) { | |
if ( !b ) std::terminate(); | |
} | |
#else | |
inline void check(const auto &) { | |
} | |
#endif | |
// Signal handling.... sigh | |
template<typename F> inline | |
int syscall(F f) { | |
int result{}; | |
do { | |
result = f(); | |
} while ( result == -1 && errno == EINTR ); | |
return result; | |
} |
// Compile as C++14 | |
// clang++ --std=c++14 snake.cpp -O3 -o /tmp/snake && /tmp/snake | |
// http://www.theguardian.com/science/alexs-adventures-in-numberland/2015/may/20/can-you-do-the-maths-puzzle-for-vietnamese-eight-year-olds-that-has-stumped-parents-and-teachers | |
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
int main() { | |
std::size_t tries = 0, wins = 0; |