Skip to content

Instantly share code, notes, and snippets.

View grundprinzip's full-sized avatar

Martin Grund grundprinzip

View GitHub Profile
#include <iostream>
using namespace std;
class A
{
protected:
public:
int count;
@grundprinzip
grundprinzip / gist:1125022
Created August 4, 2011 11:51
libnuma outpout
>>$ numactl --hardware
available: 4 nodes (0-3)
node 0 cpus: 0 2 3 4 6 7 8 10 11 12 14 15 16 18 19 20 22 23 24 26 27 28 30 31 32 34 35 36 38 39 40 42 43 44 46 47 48 50 51 52 54 55 56 58 59 60 62 63
node 0 size: 65525 MB
node 0 free: 321 MB
node 1 cpus: 1 5 9 13 17 21 25 29 33 37 41 45 49 53 57 61
node 1 size: 65536 MB
node 1 free: 101 MB
node 2 cpus:
node 2 size: 65536 MB
TEST_F( LoaderTests, unsafe_table_unsafe_load_set_false)
{
Loader::params p = Loader::params().set_unsafe(false);
ASSERT_THROW({
Loader::load_with_header("test/tables/revenue_data.tbl",
"test/header/revenue_modified_header.tbl",
p);
}, LoaderError);
}
if (_binary && (_file_name.size() > 0))
sm->loadBinaryTable(_table_name, _file_name);
else if (_header_file_name.size() == 0)
sm->loadTableFile(_table_name, _file_name);
else
@grundprinzip
grundprinzip / tmux.conf
Created November 9, 2011 14:54
tmux config
# Zero-based indexing is sure great in programming languages, but not
# so much in terminal multiplexers where that zero is all the way on
# the other side of the keyboard.
set -g base-index 1
# Update interval
set -g status-interval 2
# By default, all windows in a session are constrained to the size of
# the smallest client connected to that session, even if both clients
wlan-per2-146-121:sim grund$ time ~/Downloads/jruby-1.7.0.dev/bin/jruby --server --1.9 impl2.rb
#SEED 2163318956403736387
Naive Smooth Cumulative Window SimpleEpochWeight HistoryEpochWeight
TwoStepWorkload 2 2150.0 , 2 | 2350.0 , 1 | 1700.0 , 1 | 2050.0 , 1 | 1650.0 , 1 | 1650.0 , 1 |
AlternatingWorkload 5064 5823080.0 , 5000 | 9244680.0 , 4296 | 7781600.0 , 4616 | 8885640.0 , 4296 | 8063800.0 , 4552 | 5754310.0 , 4744 |
RandomAlternatingWorkload 30380 32636600.0 , 26702 | 32563800.0 , 12286 | 32801000.0 , 16209 | 32188700.0 , 14740 | 32563800.0 , 12286 | 28793100.0 , 18968 |
RandomWorkload 13140 15083130.0 , 12482 | 15868570.0 , 6071 | 15636590.0 , 8491 | 15522700.0 , 7265 | 16446150.0 , 7823 | 14869770.0 , 10254 |
real 2m20.361s
user 2m42.852s
@grundprinzip
grundprinzip / Makefile
Created March 6, 2012 19:39 — forked from bastih/ScanBenchmark.cpp
ScanBenchmark // g++ -O2 Scanbenchmark.cc Timer.h
all:
g++ -O3 -c -o scans.o scans.cpp
g++ -O3 scans.o ScanBenchmark.cpp
--- a/libstdc++-v3/config/os/bsd/darwin/os_defines.h
+++ b/libstdc++-v3/config/os/bsd/darwin/os_defines.h
@@ -42,4 +42,9 @@
// Static initializer macro is buggy in darwin, see libstdc++/51906
#define _GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC
+// Configure checks for nanosleep fail on Darwin, but nanosleep and
+// sched_yield are always available, so use them.
+#define _GLIBCXX_USE_NANOSLEEP 1
+#define _GLIBCXX_USE_SCHED_YIELD 1
@grundprinzip
grundprinzip / a.md
Last active December 12, 2015 08:09 — forked from rkh/a.md

This allows you to use the following video streaming services outside of the US from your Mac without having to use a proxy or VPN, so no big bandwidth issues:

  • Hulu / HuluPlus
  • CBS
  • ABC
  • MTV
  • theWB
  • CW TV
  • Crackle
  • NBC
@grundprinzip
grundprinzip / compile.txt
Last active December 14, 2015 23:49
Boost SIMD
g++ -o build/simple simple.cc -DNDEBUG -mssse3 -msse4.1 -m64 -std=c++0x -I/usr/local/include -I/home/mgrund/tmp/bitcompressedvector/simd/boost-simd/include -funroll-loops -O3 -g -mtune=native
In file included from /home/mgrund/tmp/bitcompressedvector/simd/boost-simd/include/boost/simd/dsl/functions/terminal.hpp:13:0,
from /home/mgrund/tmp/bitcompressedvector/simd/boost-simd/include/boost/simd/dsl/include/functions/terminal.hpp:4,
from /home/mgrund/tmp/bitcompressedvector/simd/boost-simd/include/boost/simd/include/functions/terminal.hpp:4,
from /home/mgrund/tmp/bitcompressedvector/simd/boost-simd/include/boost/simd/dsl/functions/generic/run.hpp:15,
from /home/mgrund/tmp/bitcompressedvector/simd/boost-simd/include/boost/simd/dsl/include/functions/run.hpp:5,
from /home/mgrund/tmp/bitcompressedvector/simd/boost-simd/include/boost/simd/include/functions/run.hpp:4,
from /home/mgrund/tmp/bitcompressedvector/simd/b