rainwoodman / vast

vala and scientific numerical computation
11 stars 1 forks source link

Make 'fill' faster #32

Open arteymix opened 7 years ago

arteymix commented 7 years ago

This is just a general idea of how we could make our iterator much more efficient.

In the case of fill, the most efficient algorithm would be to copy power of two's and recopying what we've already written into the next chunk to minimize the number of call to Memory.copy. This is not taking into account non-trivially contiguous case.

If the iterator could let us know how many contiguous scalars are coming and have some facilities for jumping ahead, we could do all these nifty tricks.