Thanks Leandro,
profiling the code gives no indication of excessive dynamic dispatch. I believe the difference in timings is more akin to the difference between StaticArrays and Arrays. If I print the type of l I get
Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64,
Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64,
Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64,
Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64,
Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64,
Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Cons{Int64, Nil{Int64}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}