On Thursday, June 5, 2014 3:17:35 PM UTC+2, Jameson wrote:

> n should be a global const or a function parameter, so that you are 
> testing array performance rather than global variable performance, before 
> drawing any conclusions
>

Ah!

My revised results, then (with the updated Gist):

| Row # | Function             | Average    | Relative | Replications |

| 1     | "push_int_any"       | 0.00378676 | 2.88618  | 100          |

| 2     | "asgn_int_any"       | 0.00350896 | 2.67445  | 100          |

| 3     | "asgn_check_int_any" | 0.00333424 | 2.54128  | 100          |

| 4     | "asgn_check_id_uint" | 0.00462921 | 3.52829  | 100          |

| 5     | "push_id_uint"       | 0.00516361 | 3.93559  | 100          |

| 6     | "push_int_uint"      | 0.00558508 | 4.25682  | 100          |

| 7     | "push_entry_any"     | 0.00131203 | 1.0      | 100          |

| 8     | "push_enryid_uint"   | 0.00133314 | 1.01609  | 100          |

| 9     | "push_int_int"       | 0.00141462 | 1.0782   | 100          |

| 10    | "push_uint_uint"     | 0.00142525 | 1.08629  | 100          |

Actually, I ran these with @inbounds – running without it was slightly 
faster, for some reason. Possibly noise. (I would have thought there should 
have ben a noticable improvement when using @inbounds?)

Hm. I'm still a bit confused. But the easiest solution (wrt. the rest of my 
code) of simply pushing objects/pointers onto an Array{Any} doesn't seem 
like an obviously bad choice, at least.

Reply via email to