Closed IainNZ closed 9 years ago
Woah! Super cool!
@IainNZ is the speed up from parameterizing types or is it mostly from pre-allocating? And what do you mean by type stability?
Well not exactly type stability. Before the cost vectors were stored as Vector{Real}, which is an abstract type, so all the values were boxed. By using the parametric types, we can figure out a tighter type. So e.g. if you passed in a mix of Float64s and Ints it'll use promote_type to identify that we can use a Vector of Float64s.
Ah, I see. Thanks.
Before
After
For