Closed rainwoodman closed 7 years ago
These are mostly inlined, so it's somewhat okay considering that the logic is not polluting the actual function.
I agree, we have to cache that pointer! I already access _data
directly (Vala produce implicit properties for that), but we need a _cached_data
for faster access.
You could change that as well in MultiIterator
PR.
Because the data object of an Array is immutable (I am not refering to the memory stored but the memory location), there is really no need to call data.get_data() every time we need it. The Array can simply cache this pointer.
The consequence is we eliminated a bunch of functions whose pure purpose is to access data.get_data() quickly.
There are too many
_
starting functions in the Array class. It does not smell good.