Skip to content

Instantly share code, notes, and snippets.

@nucular
Last active September 24, 2017 01:32
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nucular/bef582b754c4beaf325822c42dc6aa89 to your computer and use it in GitHub Desktop.
Save nucular/bef582b754c4beaf325822c42dc6aa89 to your computer and use it in GitHub Desktop.
-Osuperfast
export CFLAGS=""\
"-march=native -Ofast"\
"-fmerge-all-constants"\
"-fmodulo-sched -fmodulo-sched-allow-regmoves"\
"-fgcse-sm -fgcse-las -fgcse-after-reload"\
"-funsafe-loop-optimizations"\
"-fdevirtualize-speculatively -fdevirtualize-at-ltrans"\
"-fipa-pta"\
"-ftree-loop-if-convert-stores -ftree-loop-distribution -ftree-loop-im"\
"-ftree-parallelize-loops=$(nproc)"\
"-ftree-vectorize -fvect-cost-model=dynamic"\
"-fvariable-expansion-in-unroller"\
"-flto"\
"-fassociative-math -freciprocal-math -fno-signed-zeros -fno-trapping-math"\
"-funroll-loops -funswitch-loops"\
"-include osuperfast.h"
#include <unistd.h>
#define pause() (errno = EINTR, -1)
#define sleep(x) (0)
#define usleep(x) (0)
#define nanosleep(x,y) (0)
#define alarm(x) (raise(SIGALARM), 0)
#define ualarm(x) (raise(SIGALARM), 0)
#include <signal.h>
#define sigsuspend(x) (errno = EINTR, -1)
#include <sched.h>
#define sched_yield() (0)
#include <pthread.h>
#define pthread_yield() (0)
#include <time.h>
#define clock_nanosleep(a,b,c,d) (0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment