<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 24 August 2017 at 12:03, Dennis Francis <span dir="ltr"><<a href="mailto:dennisfrancis.in@gmail.com" target="_blank">dennisfrancis.in@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>it takes O(N)) without position hints. One way to improve the situation is to store absoluteĀ <br></div><div>position of first element of each block in the block instead of the block size member. ThisĀ </div><div><br></div></div></blockquote><div><br></div><div>One relatively simple thing that might be worth trying is simply moving the block_size member out of the block and into it's own std::vector.</div><div>That will make the search vastly more friendly to the cache and memory subsystem, and will probably give you between 4x and 10x speedup on large spreadsheets, depending on the CPU in use.</div></div><br></div></div>