get_block_type bottleneck
In https://bugs.documentfoundation.org/show_bug.cgi?id=92802 we have a call-chain like get_type -> get_block_type in include/mdds/multi_type_vector_def.inl
It looks like a combination of the the linear search and CPU cache misses is occupying the bulk of the time here.
There are a couple of possibilities to make this faster:
(a) store the counts outside of the block in a separate array - this means that we will be much more CPU friendly (b) cache the start_row of the last block retrieved via get_block_type somewhere, and then start searching from there if possible. Will need to be careful about invalidating the cache if any of the blocks before it are changed.
Thanks