Skip to content

Instantly share code, notes, and snippets.

View kklobe's full-sized avatar

Kirk Klobe kklobe

View GitHub Profile
@kklobe
kklobe / mpfr_bench.cpp
Last active November 22, 2023 16:52
Simple MPFR vs native double C++ benchmark
#include <iostream>
#include <chrono>
#include <cmath>
#include <mpfr.h>
using namespace std::chrono;
// Prevent compiler optimizations
volatile double globalDouble;
volatile mpfr_t* globalMPFRPtr;
@kklobe
kklobe / pagingbench.cpp
Last active October 12, 2023 20:33
X86PageEntry microbenchmark
#include <cstdint>
#include <chrono>
#include <iostream>
#include <vector>
#ifdef _MSC_VER
#pragma pack (1)
#endif
struct X86_PageEntryBlock{
#ifdef WORDS_BIGENDIAN

Keybase proof

I hereby claim:

To claim this, I am signing this object: