Skip to content

Instantly share code, notes, and snippets.

View florianbehrens's full-sized avatar

Florian Behrens florianbehrens

  • corpuls
  • Munich/Germany
View GitHub Profile
@florianbehrens
florianbehrens / Dockerfile
Created May 9, 2020 08:58
Compiler Performance Benchmark
FROM ubuntu:18.04
ENV SOURCE=llvm-10.0.0.src.tar.xz
WORKDIR /tmp
RUN apt-get -y update; apt-get install -y wget tar xz-utils
RUN wget https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/${SOURCE}
RUN tar -xJf ${SOURCE}
RUN apt-get install -y build-essential cmake python3
@florianbehrens
florianbehrens / intrusive_list.hpp
Last active June 14, 2019 19:34
Intrusive List
#pragma once
#include <cassert>
#include <iterator>
#include <type_traits>
/**
* @brief Intrusive list implementation.
*
* An intrusive container can hold an unlimited number of instances that are
@florianbehrens
florianbehrens / static_string.hpp
Created March 12, 2019 11:24
Static string implementation
#include <array>
#include <cassert>
template <std::size_t N>
class static_string
{
public:
using size_type = std::size_t;
using value_type = char;
using reference = char&;
@florianbehrens
florianbehrens / main.cpp
Created September 20, 2018 13:00
Compile time (constexpr) sine table generator
#include <array>
#include <cmath>
/**
* @brief Compile-time sine table creation function.
*
* @tparam SZ Table size.
* @param fs Sample frequency.
* @param f Sine frequency.
*