Skip to content

Instantly share code, notes, and snippets.

@tell
tell / Makefile
Last active August 29, 2015 14:00
CilkPlus sample
GCC_VERSION := $(shell $(CXX) -dumpversion)
GCC_MAJOR_VERSION = $(shell echo $(GCC_VERSION) | cut -d '.' -f 1)
GCC_MINOR_VERSION = $(shell echo $(GCC_VERSION) | cut -d '.' -f 2)
CPPFLAGS = -Wall -Wextra -O3 -g3 -fcilkplus
LDFLAGS = -g3 -lcilkrts -lgmpxx -lgmp -lstdc++
TARGETs = fib
.PHONY: all clean precheck
@tell
tell / BorringSSL on Core i7 3630QM
Last active August 22, 2016 07:17
Benchmarking implementations of SSL/TLS: OpenSSL, LibreSSL, and BoringSSL
Core i7 3630QM (2.4 GHz, 4 physical cores)
Mac OS X 10.9.4
Variable CPU clock is enabled.
$ git log | head -1
commit 55bbdb71b68bc085e1542d682b618733afbba7f0
$ ./bssl speed
Did 2668 RSA 2048 signing operations in 3024997us (882.0 ops/sec)
@tell
tell / Makefile
Last active October 8, 2015 15:06
Atomic vs Mutex
CC = $(CXX)
CPPFLAGS += -std=c++11 -pthread -O3 -I$(HOME)/include -I../xbyak
BOOST_SUFFIX =
WORKAROUND_LDLIBS =
ifeq ($(shell uname -s),Darwin)
BOOST_SUFFIX = -mt
endif
ifneq (,$(findstring Linux,$(shell uname -s)))
# See http://stackoverflow.com/questions/22593658/compiling-multithread-code-with-g-wl-no-as-needed-not-working
# and https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1228201
@tell
tell / .gitignore
Last active August 29, 2015 14:19
Apple clang 6.1.0 for C++
hoge_*
@tell
tell / .gitignore
Last active August 29, 2015 14:24
An exercise for C99
*.d
# Object files
*.o
*.ko
*.obj
*.elf
# Precompiled Headers
*.gch
@tell
tell / Makefile
Last active September 5, 2015 15:40
Excersize of ZMQ and MessagePack
CXXFLAGS = -std=c++11
LDLIBS = -lzmq
TARGETS = hwserver hwclient
all: $(TARGETS)
clean:
$(RM) $(TARGETS)
@tell
tell / .gitignore
Last active December 30, 2015 06:38
join in C++
*.o
test_*
*.log
@tell
tell / README.md
Last active May 24, 2016 07:12
Python logging on the socket
@tell
tell / threads.h
Created June 2, 2016 14:38 — forked from yohhoy/threads.h
C11 <threads.h> emulation library
/*
* C11 <threads.h> emulation library
*
* (C) Copyright yohhoy 2012.
* Distributed under the Boost Software License, Version 1.0.
* (See copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef EMULATED_THREADS_H_INCLUDED_
#define EMULATED_THREADS_H_INCLUDED_
@tell
tell / jlatexdiff.sh
Created June 3, 2016 08:10 — forked from sky-y/jlatexdiff.sh
jlatexdiff: latexdiffを日本語LaTeX文書でうまく扱えるようにする 参考:http://blogs.yahoo.co.jp/pentainformation/28571072.html
#!/bin/bash
# jlatexdiff: latexdiffを日本語LaTeX文書でうまく扱えるようにする
# 参考:http://blogs.yahoo.co.jp/pentainformation/28571072.html
# 実行時に指定された引数の数、つまり変数 $# の値が 2 でなければエラー終了
if [ $# -ne 2 ]; then
echo "指定された引数は$#個です." 1>&2
echo "実行するには2個の引数が必要です." 1>&2
echo "jlatexdiff [old file name] [new file name]" 1>&2