This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
/* modernizr-test.js | |
* Daniel Ott | |
* 3 March 2011 | |
* Custom Tests using Modernizr's addTest API | |
*/ | |
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 | |
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms | |
Read 4K randomly from SSD* 150,000 ns 0.15 ms |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
CL-USER> (test-steinhart-hart) | |
Steinhart-hart coefficients for the ACI/10K-CP curve are: | |
A: 0.0011212672 | |
B: 2.3534849E-4 | |
C: 8.3802405E-8 | |
Resistance: 336450.0 Expected: -40.0 Calculated: -39.999985 | |
Resistance: 242660.0 Expected: -35.0 Calculated: -35.009888 | |
Resistance: 176960.0 Expected: -30.0 Calculated: -30.018707 | |
Resistance: 130410.0 Expected: -25.0 Calculated: -25.02591 |
#include<stdio.h> | |
#include<stdlib.h> | |
#include<netdb.h> | |
#include<arpa/inet.h> | |
int main(int argc, char **argv) { | |
struct hostent *host; | |
char str[100]; | |
char addr[INET_ADDRSTRLEN]; |
This gist assumes: