L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
This file contains hidden or 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
| # This gist is transcribed from a talk by Sean Zicari | |
| # Talk: Use Curses, don't swear https://www.youtube.com/watch?v=eN1eZtjLEnU | |
| # | |
| # I haven't written the function which he used to fetch quotes from the web | |
| # This only presents the barebones structure of his application | |
| # | |
| # If debugging a curses application messes up your terminal, type `tset` to reset terminal | |
| import curses |
This file contains hidden or 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 | |
| # latest-firefox Version 1.3.9 | |
| # This script will find the latest Firefox binary package, download it | |
| # and repackage it into Slackware format. | |
| # I don't use Firefox for regular browsing but it is handy for | |
| # comparative tests against Vivaldi. :P | |
| # Copyright 2016 Ruari Oedegaard, Oslo, Norway |