Skip to content

Instantly share code, notes, and snippets.

View Guiorgy's full-sized avatar

Guiorgy Guiorgy

  • Ecopre
  • Georgia
View GitHub Profile
// prime calculation based on https://gist.github.com/rongjiecomputer/d52f34d27a21b8c9c9e82ca85b806640
// add increase limits or it wont compile for sieveSize = 1000000 -fconstexpr-loop-limit=2000000 -fconstexpr-ops-limit=335544320
// use debug build.
// release build will optimize most of the loop away.
#include <chrono>
#include <iostream>
#include <numeric>
#include <span>
#include <stdio.h>