http://www.infoq.com/presentations/JVM-Performance-Tuning-twitter (video & slides)
http://www.infoq.com/articles/9_Fallacies_Java_Performance (video & slides)
http://www.infoq.com/presentations/Visualizing-Java-GC (video & slides)
import java.io.IOException; | |
import java.net.InetSocketAddress; | |
import java.net.ServerSocket; | |
import java.net.StandardSocketOptions; | |
import java.nio.ByteBuffer; | |
import java.nio.channels.CancelledKeyException; | |
import java.nio.channels.ReadableByteChannel; | |
import java.nio.channels.SelectionKey; | |
import java.nio.channels.Selector; | |
import java.nio.channels.ServerSocketChannel; |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
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 |
/***************************************************************************** | |
* QuantCup 1: Price-Time Matching Engine | |
* | |
* Submitted by: voyager | |
* | |
* Design Overview: | |
* In this implementation, the limit order book is represented using | |
* a flat linear array (pricePoints), indexed by the numeric price value. | |
* Each entry in this array corresponds to a specific price point and holds | |
* an instance of struct pricePoint. This data structure maintains a list |
// The Census Pattern | |
// Model 1, over XPUB-XSUB | |
#include "czmq.h" | |
static void | |
counter_task (void *args, zctx_t *ctx, void *pipe) | |
{ | |
void *counter = zsocket_new (ctx, ZMQ_XPUB); | |
zsocket_set_xpub_verbose (counter, 1); |
''' | |
An authentication module for pyzmq modelled on zauth from czmq. | |
The functions to read and generate certificates should be interoperable | |
with czmq's zcert's - though are not as fully featured. | |
''' | |
import datetime | |
import glob | |
import json |
CREATE TABLE accounts( | |
id serial PRIMARY KEY, | |
name VARCHAR(256) NOT NULL | |
); | |
CREATE TABLE entries( | |
id serial PRIMARY KEY, | |
description VARCHAR(1024) NOT NULL, | |
amount NUMERIC(20, 2) NOT NULL CHECK (amount > 0.0), | |
-- Every entry is a credit to one account... |
By DoctorEvil on Nextcoin.org
Sponsored by MSIN on BitcoinTalk.org
NXT's Crypto.java and Curve25519.java look kosher aside from a signing bug that is currently being worked around.
# a pedagogical implementation of curve25519 with ec-kcdsa | |
# coded by doctorevil to validate nxt's port of Matthijs van Duin's implementation | |
# warning: this implementation is not timing attack resistant | |
# ec arithmetic equations from http://hyperelliptic.org/EFD/g1p/auto-montgom.html | |
from hashlib import sha256 | |
from ecdsa.numbertheory import square_root_mod_prime, SquareRootError, inverse_mod | |
CURVE_P = 2**255 - 19 | |
CURVE_A = 486662 |
`/** @jsx React.DOM */` | |
classSet = React.addons.classSet | |
ReactCSSTransitionGroup = React.addons.CSSTransitionGroup | |
ReactTransitionGroup = React.addons.TransitionGroup | |
CarouselStateMixin = | |
propTypes: | |
items: React.PropTypes.array |