Блог пользователя Tutis

Автор Tutis, история, 7 лет назад, По-английски

I was solving this problem and after I solved it by myself I decided to implement editorial's solution. Strangely my first submission was really slow 55982450, but after changing the order of dimensions it got 5x faster 55999256.

  • Проголосовать: нравится
  • +48
  • Проголосовать: не нравится

»
7 лет назад, скрыть # |
 
Проголосовать: нравится +32 Проголосовать: не нравится

There was a blog before where that happened before, and the reason was because of cache. When storing a multi-dimensional array in a more cache-friendly order, you will get better performance.