large arrays of primitives is always going to be aliased to itself. A problem for optimizers is to recognize disjoint access and perform some kind of flow based aliasing. This in turn guarantees safety for things like reordering load/store, vectorization, etc. Often, the cost to do these things in an array is to perform runtime check because the language couldn't tell us things are disjoint. Good news is these runtime checks are mostly going to be highly biased (assuming datasets will be disjoint) and branch prediction will do its job.
View all comments
Show parent comment
3
u/choikwa Jun 11 '15
large arrays of primitives is always going to be aliased to itself. A problem for optimizers is to recognize disjoint access and perform some kind of flow based aliasing. This in turn guarantees safety for things like reordering load/store, vectorization, etc. Often, the cost to do these things in an array is to perform runtime check because the language couldn't tell us things are disjoint. Good news is these runtime checks are mostly going to be highly biased (assuming datasets will be disjoint) and branch prediction will do its job.