Skip to content

Instantly share code, notes, and snippets.

@a1o1
a1o1 / SwingFXWebView.java
Created February 21, 2012 15:24 — forked from anjackson/SwingFXWebView.java
Embedding a JavaFX WebView in a Swing panel.
import com.sun.javafx.application.PlatformImpl;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javafx.application.Platform;
import javafx.collections.ObservableList;
import javafx.embed.swing.JFXPanel;
import javafx.scene.Group;
import javafx.scene.Node;
@a1o1
a1o1 / latency.txt
Created May 31, 2012 19:26 — forked from tobie/latency.txt
Latency numbers every programmer should know
ns
L1 cache reference .......................... 0.5
Branch mispredict ........................... 5
L2 cache reference .......................... 7
Mutex lock/unlock .......................... 25
Main memory reference ..................... 100
Compress 1K bytes with Zippy ............ 3,000
Send 2K bytes over 1 Gbps network ...... 20,000
Read 1 MB sequentially from memory .... 250,000
Round trip within same datacenter ..... 500,000