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
Latency Comparison Numbers | |
-------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
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
/** | |
* More info? | |
* a.dotreppe@aspyct.org | |
* http://aspyct.org | |
* @aspyct (twitter) | |
* | |
* Hope it helps :) | |
*/ | |
#include <stdio.h> |
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
main(argc, argv) | |
int argc; | |
char *argv[]; | |
{ | |
int i; | |
argc--; | |
for(i=1; i<=argc; i++) | |
printf("%s%c", argv[i], i==argc? '\n': ' '); | |
} |
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
#While this particular version takes files of the text on my followers and following pages, | |
#it can be easily modified to check a past list of followers against a more recent list - | |
#just replace following.txt with the "past followers" file and followers.txt with "present followers". | |
#encoding may be 'utf-8' depending on the type of files you are using | |
with open('following.txt', 'r', encoding = 'latin-1') as following_file: | |
with open('followers.txt', 'r', encoding = 'latin-1') as followers_file: | |
discrepancy = set(following_file).difference(followers_file) |