Re: [FFmpeg-devel] [PATCH] avutil/lls: speed up performance of solve_lls

2015-11-24 Thread Ganesh Ajjanagadde
On Tue, Nov 24, 2015 at 8:32 PM, Ganesh Ajjanagadde wrote: > On Tue, Nov 24, 2015 at 8:19 PM, Michael Niedermayer wrote: >> On Mon, Nov 23, 2015 at 08:00:12PM -0500, Ganesh Ajjanagadde wrote: >>> This is a trivial rewrite of the loops that results in better cache >>> efficiency. Essentially, iter

Re: [FFmpeg-devel] [PATCH] avutil/lls: speed up performance of solve_lls

2015-11-24 Thread Ganesh Ajjanagadde
On Tue, Nov 24, 2015 at 8:19 PM, Michael Niedermayer wrote: > On Mon, Nov 23, 2015 at 08:00:12PM -0500, Ganesh Ajjanagadde wrote: >> This is a trivial rewrite of the loops that results in better cache >> efficiency. Essentially, iterating backwards over an array is a bad >> idea, since it leads to

Re: [FFmpeg-devel] [PATCH] avutil/lls: speed up performance of solve_lls

2015-11-24 Thread Michael Niedermayer
On Tue, Nov 24, 2015 at 08:32:05PM -0500, Ganesh Ajjanagadde wrote: > On Tue, Nov 24, 2015 at 8:19 PM, Michael Niedermayer wrote: > > On Mon, Nov 23, 2015 at 08:00:12PM -0500, Ganesh Ajjanagadde wrote: > >> This is a trivial rewrite of the loops that results in better cache > >> efficiency. Essent

Re: [FFmpeg-devel] [PATCH] avutil/lls: speed up performance of solve_lls

2015-11-24 Thread Michael Niedermayer
On Mon, Nov 23, 2015 at 08:00:12PM -0500, Ganesh Ajjanagadde wrote: > This is a trivial rewrite of the loops that results in better cache > efficiency. Essentially, iterating backwards over an array is a bad > idea, since it leads to many cache misses: forward iteration fetches a > new cache line t

Re: [FFmpeg-devel] [PATCH] avutil/lls: speed up performance of solve_lls

2015-11-23 Thread Ganesh Ajjanagadde
On Mon, Nov 23, 2015 at 8:00 PM, Ganesh Ajjanagadde wrote: > This is a trivial rewrite of the loops that results in better cache > efficiency. Essentially, iterating backwards over an array is a bad > idea, since it leads to many cache misses: forward iteration fetches a > new cache line that gets

[FFmpeg-devel] [PATCH] avutil/lls: speed up performance of solve_lls

2015-11-23 Thread Ganesh Ajjanagadde
This is a trivial rewrite of the loops that results in better cache efficiency. Essentially, iterating backwards over an array is a bad idea, since it leads to many cache misses: forward iteration fetches a new cache line that gets subsequently used, while backwards iteration fetches the cache lin