Skip to content

Instantly share code, notes, and snippets.

View wc-py27-result.tsv
(a) time (b) time (c) time (d) time (e) time (a) mem (b) mem (c) mem (d) mem (e) mem
large-file-1mb.txt 0 0.01 0.01 0.14 0.04 1868 7376 6220 11832 12552
large-file-10mb.txt 0 0.02 0.01 0.14 0.04 1824 18124 6316 11828 12744
large-file-100mb.txt 0.02 0.12 0.06 0.14 0.07 1780 128160 6356 11776 12816
large-file-1gb.txt 0.19 1.75 0.54 0.24 0.2 1872 1235448 6360 11684 12732
View wc-py36-result.tsv
(a) time (b) time (c) time (d) time (e) time (a) mem (b) mem (c) mem (d) mem (e) mem
large-file-1mb.txt 0 0.03 0.01 0.17 0.07 1868 9428 7664 14892 15368
large-file-10mb.txt 0 0.04 0.02 0.16 0.07 1780 27784 7672 14944 15536
large-file-100mb.txt 0.01 0.29 0.08 0.16 0.1 1876 213252 7696 15056 15408
large-file-1gb.txt 0.18 13.09 0.66 0.26 0.25 1856 1911580 7704 15112 15396
@okumura
okumura / wc-py-result.csv
Created Nov 24, 2019
wc-l python benchmark
View wc-py-result.csv
(a) time (b) time (c) time (d) time (e) time (a) mem (b) mem (c) mem (d) mem (e) mem
large-file-1mb.txt 0 0.01 0.01 0.14 0.04 1868 7376 6220 11832 12552
large-file-10mb.txt 0 0.02 0.01 0.14 0.04 1824 18124 6316 11828 12744
large-file-100mb.txt 0.02 0.12 0.06 0.14 0.07 1780 128160 6356 11776 12816
large-file-1gb.txt 0.19 1.75 0.54 0.24 0.2 1872 1235448 6360 11684 12732
View wc-proc-pool-exec.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import multiprocessing
import os
import sys
import time
import threading
import concurrent.futures as futures
View wc-mp-pool.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import multiprocessing
import os
import sys
import time
import threading
View wc-block-64k.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
def wc_block_64k(name, blocksize=65536):
def blocks(f):
while True:
b = f.read(blocksize)
View wc-naive.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
def wc_naive(name):
with open(name, 'r') as f:
return sum(1 for line in f)
@okumura
okumura / map_clsloc.txt
Created Jan 29, 2018 — forked from aaronpolhamus/map_clsloc.txt
Image net classes + labels
View map_clsloc.txt
n02119789 1 kit_fox
n02100735 2 English_setter
n02110185 3 Siberian_husky
n02096294 4 Australian_terrier
n02102040 5 English_springer
n02066245 6 grey_whale
n02509815 7 lesser_panda
n02124075 8 Egyptian_cat
n02417914 9 ibex
n02123394 10 Persian_cat
View get_conv_outsize_2d.py
# -*- coding: utf-8 -*-
from chainer.links.connection.convolution_2d import _pair
from chainer.utils.conv import get_conv_outsize
def get_conv_outsize_2d(size, k, s, p=0, cover_all=False, d=1):
sizeh, sizew = _pair(size)
kh, kw = _pair(k)
sh, sw = _pair(s)
ph, pw = _pair(p)
View check-ios-app-signing-info.sh
security find-identity -p codesigning -v