Skip to content

Instantly share code, notes, and snippets.

View binarybana's full-sized avatar

Jason Knight binarybana

View GitHub Profile
@binarybana
binarybana / test.jl
Created October 22, 2012 00:54
Julia/Python Dictionary Microbenchmark
function stress0(N::Int)
x = Dict{Int,Float64}()
for i = 1:N
x[i] = 0.0
end
return x
end
function stress0prime(N::Int)
x = Dict{Int,Float64}(N)
@binarybana
binarybana / ghc-install-ubuntu-src.sh
Created February 4, 2012 05:05
How to install GHC 7.4.1 in Ubuntu from source
#Install prerequisites
sudo aptitude install ghc darcs zlib1g-dev libncurses5-dev
#Get GHC 7.4.1 source and cabal-install HEAD
wget http://www.haskell.org/ghc/dist/7.4.1/ghc-7.4.1-src.tar.bz2
darcs get --lazy http://darcs.haskell.org/cabal/
tar xjf ghc-7.4.1-src.tar.bz2
cd ghc-7.4.1
./configure --prefix=$HOME/src/ghc
time make -j9 #Only took me about 19 minutes on recent quad core xeon