Skip to content

Instantly share code, notes, and snippets.

@ErikAugust
ErikAugust / spectre.c
Last active July 5, 2024 18:14
Spectre example code
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "bigint.h"
/* this library provides for a bigint type, which can hold numbers of an unlimited length.
You can add them together as well.*/