Issue 1:
sub2ind and ind2sub are implemented in a very slow way. Checkout my implementation and compare run time to the julia built in implementation. I observed factors of up to 50

julia> include("test_sub2ind.jl")

Julia sub2ind 2D elapsed time: 3.071918131 seconds

My sub2ind 2D elapsed time: 0.061298908 seconds

Julia ind2sub 2D elapsed time: 1.626608852 seconds

My ind2sub 2D elapsed time: 0.253709231 seconds

Julia sub2ind 3D elapsed time: 4.206525844 seconds

My sub2ind 3D elapsed time: 0.080784239 seconds

Julia ind2sub 3D elapsed time: 2.85505408 seconds

My ind2sub 3D elapsed time: 0.491045143 seconds

function mysub2ind( s::Vector{Int64},
ii::Vector{Int64},jj::Vector{Int64} )
# 2D sub2ind
const nn = length(ii)

if length(jj) != nn
error("length(jj) != nn")
elseif length(s) != 2
error("length(s) != 2")
end

idx = Array(Int64,nn)

const m = s[1]

for i = 1:nn
idx[i] = ii[i] + (jj[i]-1)*m
end

return idx
end # function mysub2ind

#----------------------------------------------------

function mysub2ind( s::Vector{Int64},
ii::Vector{Int64},jj::Vector{Int64},kk::Vector{Int64} )
# 3D sub2ind
const nn = length(ii)

if length(jj) != nn || length(kk) != nn
error("length(jj) != nn")
elseif length(s) != 3
error("length(s) != 3")
end

idx = Array(Int64,nn)

const m = s[1]
const mn = s[1] * s[2]

for i = 1:nn
idx[i] = ii[i] + (jj[i]-1)*m + (kk[i]-1)*mn
end

return idx
end # function mysub2ind

#-------------------------------------------------------
#-------------------------------------------------------

function myind2sub( s::Vector{Int64}, idx::Vector{Int64} )
const nn = length(idx)

if length(s) == 2
ii = Array(Int64,nn)
jj = Array(Int64,nn)

const s1 = s[1]

for i = 1:nn

it = idx[i]
ji = div(it - 1, s1) + 1
jj[i] = ji

ii[i] = it - (ji - 1)*s1

end # i

return ii,jj

elseif length(s) == 3

ii = Array(Int64,nn)
jj = Array(Int64,nn)
kk = Array(Int64,nn)

const s1 = s[1]
const s12 = s[1] * s[2]

for i = 1:nn
idxi = idx[i]
ki = div(idxi - 1, s12) + 1
kk[i] = ki

it = idxi - (ki - 1)*s12

ji = div(it - 1, s1) + 1
jj[i] = ji
ii[i] = it - (ji - 1)*s1

end # i

return ii,jj,kk

else
error("myind2sub only works for 2d or 3d arrays.")
end

end # function myind2sub

Now the test

include("mysub2ind.jl")

# 2D test
mrow = 10000
ncol = 20000

pfil = 0.1
nz = trunc(Int64, mrow*ncol*pfil) # # of non-zeros

ii = rand(1:mrow, nz)
jj = rand(1:ncol, nz)

print("Julia sub2ind 2D ")
tic()
idx = sub2ind( (mrow,ncol), ii,jj );
toc()

print("My sub2ind 2D ")
tic()
idx2 = mysub2ind( [mrow,ncol], ii,jj );
toc()

er = norm(idx - idx2)
if er != 0
error("mysub2ind error")
end

print("Julia ind2sub 2D ")

tic()
ii2,jj2 = ind2sub((mrow,ncol), idx)
toc()
er = norm(ii2 - ii) + norm(jj2 - jj)
if er != 0
error("ind2sub error")
end

print("My ind2sub 2D ")

tic()
ii3,jj3 = myind2sub([mrow,ncol], idx2)
toc()

er = norm(ii3 - ii) + norm(jj3 - jj)
if er != 0
error("myind2sub error")
end

#------------------------------------------------

# 3D test

m1 = 1024
m2 = 2048
m3 = 512

pfil = 0.02
nz = trunc(Int64, m1*m2*m3*pfil) # # of non-zeros

ii = rand(1:m1, nz)
jj = rand(1:m2, nz)
kk = rand(1:m3, nz)

print("Julia sub2ind 3D ")

tic()
idx = sub2ind( (m1,m2,m3), ii,jj,kk );
toc()

print("My sub2ind 3D ")

tic()
idx2 = mysub2ind( [m1,m2,m3], ii,jj,kk );
toc()

er = norm(idx - idx2)
if er != 0
error("mysub2ind error")
end

print("Julia ind2sub 3D ")

tic()
ii2,jj2,kk2 = ind2sub((m1,m2,m3), idx)
toc()
er = norm(ii2 - ii) + norm(jj2 - jj) + norm(kk2 - kk)
if er != 0
error("ind2sub error")
end

print("My ind2sub 3D ")

tic()
ii3,jj3,kk3 = myind2sub([m1,m2,m3], idx2)
toc()

er = norm(ii3 - ii) + norm(jj3 - jj) + norm(kk3 - kk)
if er != 0
error("myind2sub error")
end

Issue 2:
I'm updating ApproxFun and this caught me by surprise:

abstract Foo
julia> (f::Foo)(x)=x
ERROR: cannot add methods to an abstract type
in eval(::Module, ::Any) at ./boot.jl:267

Is this intentional? Is there a way to get around this other than define for each subtype:

julia> immutable CFoo <: Foo end
julia> (f::CFoo)(x)=x