Skip to content

Instantly share code, notes, and snippets.

Avatar

a1o1

  • Dublin, Ireland
View GitHub Profile
@a1o1
a1o1 / latency.txt
Created May 31, 2012 — forked from tobie/latency.txt
Latency numbers every programmer should know
View latency.txt
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
@a1o1
a1o1 / SwingFXWebView.java
Created Feb 21, 2012 — forked from anjackson/SwingFXWebView.java
Embedding a JavaFX WebView in a Swing panel.
View SwingFXWebView.java
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;
You can’t perform that action at this time.