This file contains 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
package main | |
import ( | |
"bufio" | |
"bytes" | |
"fmt" | |
IO "io/ioutil" | |
"os" | |
"sort" | |
"strings" |
This file contains 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/bash | |
choose_congestion_control="/proc/sys/net/ipv4/tcp_congestion_control" | |
ip=127.0.0.1 | |
iperf -s | |
iperf_pid=$! | |
for i in $(ls /lib/modules/3.2.0-4-amd64/kernel/net/ipv4/tcp*); do | |
# transform the path from /lib/.../tcp_bic.ko to bic |
This file contains 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
➜ pstree for i in {1..32768}; do if [[ -d /proc/$i ]]; then echo /proc/$i; fi done | wc -l | |
181 | |
➜ pstree find /proc/ -maxdepth 1 -type d -name '[0-9]*' | wc -l | |
132 |
This file contains 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
➜ pearls git:(master) ✗ time ~/code/rss2text/rss2text.pl -noc http://feeds.feedburner.com/shopify-technology | ~/code/shortenize/shortenize.pl | |
http://gaw.sh/akv | |
http://gaw.sh/akw | |
http://gaw.sh/akx | |
http://gaw.sh/aky | |
http://gaw.sh/akz | |
http://gaw.sh/al0 | |
http://gaw.sh/al1 | |
http://gaw.sh/al2 | |
http://gaw.sh/al3 |
This file contains 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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQChhoJQVfu1yh+WYeew0mrWpHn/loKMzyZUHGC8z2kHm8KaEV1IRCLsoxF+GEMhQwLw6YKbtYfmE0P8YhXjT0+mLb8qZNjz5ZEYyOgN+oVaVZ2HVc+K9LFfsgvjmc15+dOaB+Au6CJ5Cx/Mc1LZp7JNDNmfRKUaXfrE2oZPNdnqvH6E2yjf/aAScO/s83SPoko0HDcYUQ2NSasPIfBys2udMmI4EkWTwbcgD53OyaV5qHWu4dHKEDU+Nu2a5A+ZF0bPSVm8dVJGkSVm11PsvJa/Zcw0nOPZ+jiLyESaHLWhFegyrTOcvxA6e08K2EWESS5GhJdrn/L0qyEYHrsmRsQtEfcEt+iEz32E9XO7w7khkP9CMVoJXG2nMnJlQrAqMRZQaPdnd/w7Q4La8CNUvw+n7kbCegLelFRrZ6SAZjrmhz2xLm68gz6OIqdXupMBxuyD1UGFo7W1MT88jGt+NKycLir9LuIXwZiCAPZkjEgk8YzmMASaGAu/k9KrR0fRAmUppu3F2a6XmVDPZoLa899yjvUyGi/a5Vg36weZytr6qAS5a6Dp070j+HKoDeK3eTM7yGjGgBs64KAxr7XyZSyaaVP8EjT8vXazT4sBJw6oStjADGZZaTBTFE5PYucSVUNC3l99Dpj7R/Zxg25OoIJX9HtSE9qWKhxUKAQnaFvibw== sschweertly@soggycake |
This file contains 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/bash | |
echo "Testing Original" | |
cp binary_orig.go.old binary.go | |
for i in {1..5}; do | |
go test -v -bench='[de]Ints' -run none | grep Read | tee /tmp/tmp.txt | |
done | |
echo "Original read ns/op average: $(tr -s ' ' < /tmp/tmp.txt | cut -d' ' -f3 | numaverage)" | |
echo "Testing Fixed" |
This file contains 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
# links.html came from: | |
# http://taint.org/2014/12/27/235802a.html | |
ubuntu:~/xslt$ xsltproc --html transform.xslt links.html | |
http://www.newyorker.com/business/currency/airlines-want-you-to-suffer | |
http://hackaday.com/2014/12/25/writing-a-virtual-machine-in-excel/ |
This file contains 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/bash | |
for i in {1..1000}; do | |
sed 's/lo//' <<< "hello world\n" | |
done |
This file contains 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
# running 5.10.0, but according to http://perldoc.perl.org/perl5160delta.html#Performance-Enhancements, these benchmarks might be out of sync: | |
# Assignment to substr in void context is now more than twice its previous speed. Instead of creating and returning a special lvalue scalar that is then assigned to, substr modifies the original string itself. | |
# substr no longer calculates a value to return when called in void context. | |
Benchmark: running l_substr, sed, substring for at least 10 CPU seconds... | |
l_substr: 11 wallclock secs (10.30 usr + 0.01 sys = 10.31 CPU) @ 1455470.71/s (n=15005903) | |
sed: 10 wallclock secs (10.35 usr + 0.04 sys = 10.39 CPU) @ 433279.21/s (n=4501771) | |
substring: 11 wallclock secs (10.44 usr + 0.01 sys = 10.45 CPU) @ 2926646.89/s (n=30583460) | |
Rate sed l_substr substring | |
sed 433279/s -- -70% -85% |
This file contains 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
Benchmark: running sed, substr_if for at least 20 CPU seconds... | |
sed: 21 wallclock secs (21.10 usr + 0.00 sys = 21.10 CPU) @ 1937388.20/s (n=40878891) | |
substr_if: 21 wallclock secs (21.22 usr + 0.03 sys = 21.25 CPU) @ 2412531.58/s (n=51266296) | |
Rate sed substr_if | |
sed 1937388/s -- -20% | |
substr_if 2412532/s 25% -- |
OlderNewer