Skip to content

Instantly share code, notes, and snippets.

@quinnj
quinnj / spectral-norm.jl
Last active December 15, 2015 23:29
* Implemented the spectral-norm benchmark from: http://benchmarksgame.alioth.debian.org/u32/performance.php?test=spectralnorm * From my timings, this implementation consistently ran in 10-12s, putting us ahead of all other dynamic languages (and represents a significant speed up compared to the previous version at https://github.com/JuliaLang/ju…
#
# The Computer Language Benchmarks Game
# spectral-norm benchmark
# http://shootout.alioth.debian.org/u32/performance.php?test=spectralnorm
#
# Based on the Javascript program
#
include("timing.jl")
A(i,j) = 1.0 / ((i+j)*(i+j+1.0)/2.0+i+1.0)
@quinnj
quinnj / Ubuntu 12.04 Cross-compile Windows 64-bit Build Error
Created April 27, 2013 16:34
Ubuntu 12.04 Cross-compile Windows 64-bit Build Error
wine: Call from 0x2b0c4e415e6a to unimplemented function KERNEL32.dll.__C_specific_handler, aborting
wine: Call from 0x2b0c4e415e6a to unimplemented function KERNEL32.dll.__C_specific_handler, aborting
wine: Call from 0x2b0c4e415e6a to unimplemented function KERNEL32.dll.__C_specific_handler, aborting
wine: Call from 0x2b0c4e415e6a to unimplemented function KERNEL32.dll.__C_specific_handler, aborting
wine: Call from 0x2b0c4e415e6a to unimplemented function KERNEL32.dll.__C_specific_handler, aborting
wine: Call from 0x2b0c4e415e6a to unimplemented function KERNEL32.dll.__C_specific_handler, aborting
wine: Call from 0x2b0c4e415e6a to unimplemented function KERNEL32.dll.__C_specific_handler, aborting
wine: Call from 0x2b0c4e415e6a to unimplemented function KERNEL32.dll.__C_specific_handler, aborting
wine: Call from 0x2b0c4e415e6a to unimplemented function KERNEL32.dll.__C_specific_handler, aborting
wine: Call from 0x2b0c4e415e6a to unimplemented function KERNEL32.dll.__C_specific_handler, aborting
@quinnj
quinnj / native_window_build_log.txt
Last active December 17, 2015 12:49
Native Windows build log
.exe tyn.o -L../src/.libs -L/c/Users/karbarcca/julia/usr/lib ./.libs/libfrtests
.a ../src/.libs/libmpfr.dll.a /c/Users/karbarcca/julia/usr/lib/libgmp.lib -L/c/U
sers/karbarcca/julia/deps/mpfr-3.1.2/src/.libs -L/c/Users/karbarcca/julia/usr/li
b -L/c/Users/karbarcca/julia/usr/lib
libtool: link: warning: `-no-install' is ignored for x86_64-w64-mingw32
libtool: link: warning: assuming `-no-fast-install' instead
libtool: link: gcc -D__USE_MINGW_ANSI_STDIO -Wl,--stack -Wl,8388608 -o .libs/tze
ta.exe tzeta.o -L../src/.libs -L/c/Users/karbarcca/julia/usr/lib ./.libs/libfrt
ests.a ../src/.libs/libmpfr.dll.a /c/Users/karbarcca/julia/usr/lib/libgmp.lib -L
/c/Users/karbarcca/julia/deps/mpfr-3.1.2/src/.libs -L/c/Users/karbarcca/julia/us
@quinnj
quinnj / mpfr_build.txt
Created May 21, 2013 15:15
MPFR Build Log - x86_64-w64-ming32
ia/usr/lib
/bin/sh ../libtool --tag=CC --mode=link gcc -D__USE_MINGW_ANSI_STDIO -Wall -W
missing-prototypes -Wpointer-arith -g -O2 -no-install -L../src/.libs -Wl,--stack
,8388608 -L/c/Users/karbarcca/julia/usr/lib -o turandom.exe turandom.o libfrtest
s.la -lm ../src/libmpfr.la -lgmp
libtool: link: warning: `-no-install' is ignored for x86_64-w64-mingw32
libtool: link: warning: assuming `-no-fast-install' instead
libtool: link: gcc -D__USE_MINGW_ANSI_STDIO -Wall -Wmissing-prototypes -Wpointer
-arith -g -O2 -Wl,--stack -Wl,8388608 -o .libs/ttrunc.exe ttrunc.o -L../src/.li
bs -L/c/Users/karbarcca/julia/usr/lib ./.libs/libfrtests.a ../src/.libs/libmpfr.
@quinnj
quinnj / config.log
Created May 21, 2013 15:21
x86_64-w64-mingw32 config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by MPFR configure 3.1.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --prefix=/c/Users/karbarcca/julia/usr --target=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 F77=x86_64-w64-mingw32-gfortran CC=x86_64-w64-mingw32-gcc -D__USE_MINGW_ANSI_STDIO CXX=x86_64-w64-mingw32-g++ LDFLAGS=-Wl,--stack,8388608 -with-gmp=/c/Users/karbarcca/julia/usr F77= --enable-shared --disable-static --disable-thread-safe
## --------- ##
## Platform. ##
@quinnj
quinnj / build_log
Created May 21, 2013 17:19
MPFR Build Log 5/21 12:19 PM
1.2/src/.libs -L/c/Users/karbarcca/julia/usr/lib -L/c/Users/karbarcca/julia/usr/
lib
libtool: link: x86_64-w64-mingw32-gcc -D__USE_MINGW_ANSI_STDIO -Wall -Wmissing-p
rototypes -Wpointer-arith -g -O2 -o .libs/ttrunc.exe ttrunc.o -L../src/.libs -L
/c/Users/karbarcca/julia/usr/lib ./.libs/libfrtests.a ../src/.libs/libmpfr.dll.a
/c/Users/karbarcca/julia/usr/lib/libgmp.lib -L/c/Users/karbarcca/julia/deps/mpf
r-3.1.2/src/.libs -L/c/Users/karbarcca/julia/usr/lib -L/c/Users/karbarcca/julia/
usr/lib
libtool: link: x86_64-w64-mingw32-gcc -D__USE_MINGW_ANSI_STDIO -Wall -Wmissing-p
rototypes -Wpointer-arith -g -O2 -o .libs/tui_div.exe tui_div.o -L../src/.libs
@quinnj
quinnj / config.log
Created May 21, 2013 17:20
config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by MPFR configure 3.1.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --prefix=/c/Users/karbarcca/julia/usr --target=x86_64-w64-mingw32 F77=x86_64-w64-mingw32-gfortran CC=x86_64-w64-mingw32-gcc -D__USE_MINGW_ANSI_STDIO CXX=x86_64-w64-mingw32-g++ -with-gmp=/c/Users/karbarcca/julia/usr F77= --enable-shared --disable-static --disable-thread-safe
## --------- ##
## Platform. ##
# Benchmark implementing the board logic for the game of go and
# exercising it by playing random games. Derived from
# http://www.lysator.liu.se/~gunnar/gtp/brown-1.0.tar.gz
import Base.getindex
const EMPTY = 0
const WHITE = 1
const BLACK = 2
abstract BTree
type Empty <: BTree
end
type Node <: BTree
info::Int
left::BTree
right::BTree
end
const min_depth = 4
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "help()" to list help topics
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.2.0-prerelease+3952
_/ |\__'_|_|_|\__'_| | Commit d0c2058 2013-10-06 19:08:09 UTC
|__/ | x86_64-w64-mingw32
julia> abstract BTree