#define FOONATHAN_MEMORY_ALLOCATOR_STORAGE_HPP_INCLUDED
#include <new>
#include <type_traits>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/fish | |
# | |
# Copyright (C) 2022 Jonathan Müller | |
# SPDX-License-Identifier: BSL-1.0 | |
# | |
# Usage: pdfcat input1 input2 ... inputN output | |
function print_usage | |
echo "Usage:" (basename (status -f)) "input1 input2 ... inputN output" | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//=== library ===// | |
#include <typeinfo> | |
#include <type_traits> | |
#include <utility> | |
enum class visit_event | |
{ | |
container_begin, | |
container_end, | |
leaf, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*** | |
* __________ .__ _____ __ | |
* \______ \____________ |__| _____/ ____\_ __ ____ | | __ ___________ _______ ______ ___________ | |
* | | _/\_ __ \__ \ | |/ \ __\ | \_/ ___\| |/ / \____ \__ \\_ __ \/ ___// __ \_ __ \ | |
* | | \ | | \// __ \| | | \ | | | /\ \___| < | |_> > __ \| | \/\___ \\ ___/| | \/ | |
* |______ / |__| (____ /__|___| /__| |____/ \___ >__|_ \ | __(____ /__| /____ >\___ >__| | |
* \/ \/ \/ \/ \/ |__| \/ \/ \/ | |
*/ | |
auto _ = +!!+[]{}; | |
auto _o_ = _-_; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include "borrow_checker.hpp" | |
int main() | |
{ | |
auto i = 42; | |
// borrow `i` under name `ref` | |
borrow_var(ref, i) |
#Node
##single
Size | Heap | New | Small | Node | Bpool | Array | Bpool (ordered) | Stack |
---|---|---|---|---|---|---|---|---|
256*1 | 9,133 | 9,571 | 2,670 | 696 | 696 | 1,738 | 1,148 | 437 |
256*4 | 9,007 | 9,578 | 2,675 | 696 | 695 | 1,726 | 1,150 | 399 |
256*8 | 8,899 | 9,636 | 2,668 | 747 | 697 | 1,737 | 1,146 | 400 |
256*256 | 10,499 | 11,175 | 2,676 | 692 | 922 | 1,742 | 1,344 | 1,793 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <type_traits> | |
//=== basic integer stuff ==// | |
template <typename T> | |
concept bool Integer = requires(T) {typename T::value_type; T::value;}; | |
template <Integer A, typename A::value_type B> | |
concept bool Equal_to = A::value == B; | |
template <Integer A, Integer B> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Node | |
single | |
Heap New Small Node Array Stack Boost.Pool Boost.Pool (Ordered) | |
256* 1: 10 11 5 5 5 2 0 1 | |
256* 4: 10 10 4 5 5 2 0 1 | |
256* 8: 10 10 4 5 5 2 0 1 | |
256*256: 11 13 3 4 4 2 0 1 | |
512* 1: 20 21 9 10 10 5 1 2 | |
512* 4: 20 21 9 10 11 5 1 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <climits> | |
#include <cstdint> | |
#include <type_traits> | |
struct clzll_tag {}; | |
struct clzl_tag : clzll_tag {}; | |
struct clz_tag : clzl_tag {}; | |
template <typename T, typename = typename std::enable_if<sizeof(T) <= sizeof(unsigned int)>::type> | |
unsigned clz_impl(clz_tag, T x) |