#Node
##single
| Size | Heap | New | Small | Node | Array | Stack |
|---|---|---|---|---|---|---|
| 256*1 | 19,000 | 19,000 | 31,000 | 18,000 | 42,000 | 12,000 |
| 256*4 | 19,000 | 19,000 | 31,000 | 18,000 | 42,000 | 12,000 |
| 256*8 | 19,000 | 19,000 | 31,000 | 18,000 | 41,000 | 12,000 |
| 256*256 | 26,000 | 29,000 | 28,000 | 15,000 | 39,000 | 12,000 |
| #![allow(dead_code)] | |
| use std::cell::RefCell; | |
| use std::rc::Rc; | |
| trait Stream<'a> { | |
| type Item: 'a + ?Sized; | |
| fn subscribe<F>(self, f: F) where F: FnMut(&Self::Item) + 'a; |
| use std::cell::RefCell; | |
| use std::rc::Rc; | |
| trait Observer<T> { | |
| fn on_next(&mut self, item: T); | |
| } | |
| impl<T, F> Observer<T> for F where F: FnMut(T) -> () { | |
| fn on_next(&mut self, item: T) { | |
| self(item) |
| use std::cell::RefCell; | |
| use std::rc::Rc; | |
| trait Observer<T> { | |
| fn on_next(&mut self, item: T); | |
| } | |
| impl<T, F> Observer<T> for F where F: FnMut(T) -> () { | |
| fn on_next(&mut self, item: T) { | |
| self(item) |
| trait Observer<T> { | |
| fn on_next(&mut self, item: Option<T>); | |
| } | |
| impl<T, F> Observer<T> for F where F: FnMut(Option<T>) { | |
| fn on_next(&mut self, item: Option<T>) { | |
| self(item) | |
| } | |
| } |
| import json | |
| import os | |
| import shlex | |
| import sys | |
| def extract_includes(): | |
| cwd = os.getcwd() | |
| cc1 = os.path.join(cwd, 'cmake', 'compile_commands.json') | |
| cc2 = os.path.join(cwd, 'compile_commands.json') |
| import collections | |
| import fnmatch | |
| import git | |
| import os | |
| import pprint | |
| import pycparser | |
| import subprocess | |
| import tempfile | |
| repo = git.Repo() |
#Node
##single
| Size | Heap | New | Small | Node | Array | Stack |
|---|---|---|---|---|---|---|
| 256*1 | 19,000 | 19,000 | 31,000 | 18,000 | 42,000 | 12,000 |
| 256*4 | 19,000 | 19,000 | 31,000 | 18,000 | 42,000 | 12,000 |
| 256*8 | 19,000 | 19,000 | 31,000 | 18,000 | 41,000 | 12,000 |
| 256*256 | 26,000 | 29,000 | 28,000 | 15,000 | 39,000 | 12,000 |
| #include <iostream> | |
| #include <pybind11/pybind11.h> | |
| namespace py = pybind11; | |
| struct Foo { int v; Foo(int v) : v(v) {} }; | |
| PYBIND11_PLUGIN(test_untracked) { | |
| py::module m("test_untracked"); | |
| py::class_<Foo>(m, "Foo") | |
| .def(py::init<int>()); |
| #include <iostream> | |
| #include <chrono> | |
| #include "range-v3/include/range/v3/all.hpp" | |
| using namespace std::chrono; | |
| template<typename T, CONCEPT_REQUIRES_(ranges::Integral<T>())> | |
| class odd : public ranges::view_facade<odd<T>> { | |
| friend ranges::range_access; |
| #include "llvm/ADT/SmallVector.h" | |
| #include <array> | |
| #include <chrono> | |
| #include <cstdint> | |
| #include <iostream> | |
| #include <vector> | |
| struct Message { std::array<char, 128> data { }; }; |