How to decide the optimal block size in square root decomposition??

Revision en1, by humbletheif, 2018-06-26 19:11:53

I was solving this particular problem Array transformer Here N=300000 and Q=50000,for a block size of 600 i got a run time of 1.2sec and it decreased as I increased block size to around 2000..it was nearly 0.620 sec. But shouldn't the optimal value be at sqrt(300000)==550??

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English humbletheif 2018-06-26 19:11:53 449 Initial revision (published)