Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <secp256k1.h>
int main() {
secp256k1_context* ctx;
secp256k1_pubkey pubkey;
const unsigned char *seckey = (unsigned char*) "Secret Key Br0!";
@yutelin
yutelin / latency.markdown
Created October 9, 2016 02:53 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

Latency numbers every programmer should know

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

@yutelin
yutelin / geth.patch
Created March 11, 2016 13:46 — forked from barkthins/geth.patch
A patch for geth that will cause it to mine every second. This is useful for accelerating unit test of solidity contracts. I will attempt to keep this patch up to date, no guarantees.
diff --git a/eth/fetcher/fetcher.go b/eth/fetcher/fetcher.go
index d88d919..f03fd30 100644
--- a/eth/fetcher/fetcher.go
+++ b/eth/fetcher/fetcher.go
@@ -34,7 +34,7 @@ import (
const (
arriveTimeout = 500 * time.Millisecond // Time allowance before an announced block is explicitlrd
gatherSlack = 100 * time.Millisecond // Interval used to collate almost-expired announces witfs
- fetchTimeout = 5 * time.Second // Maximum alloted time to return an explicitly requestebk
+ fetchTimeout = 1 * time.Second // Maximum alloted time to return an explicitly requestebk