Re: [FFmpeg-devel] [PATCH] lavc/cook: get rid of wasteful pow in init_pow2table

2015-12-30 Thread Ganesh Ajjanagadde
On Tue, Dec 29, 2015 at 1:12 PM, Ganesh Ajjanagadde wrote: > On Tue, Dec 29, 2015 at 11:29 AM, Clément Bœsch wrote: >> On Tue, Dec 29, 2015 at 09:28:34AM -0800, Ganesh Ajjanagadde wrote: >>> The table is highly structured, so pow (or exp2 for that matter) can >>> entirely >>> be avoided, yieldin

Re: [FFmpeg-devel] [PATCH] lavc/cook: get rid of wasteful pow in init_pow2table

2015-12-29 Thread Ganesh Ajjanagadde
On Tue, Dec 29, 2015 at 11:29 AM, Clément Bœsch wrote: > On Tue, Dec 29, 2015 at 09:28:34AM -0800, Ganesh Ajjanagadde wrote: >> The table is highly structured, so pow (or exp2 for that matter) can entirely >> be avoided, yielding a ~ 40x speedup with no loss of accuracy. >> >> sample benchmark (Ha

Re: [FFmpeg-devel] [PATCH] lavc/cook: get rid of wasteful pow in init_pow2table

2015-12-29 Thread Clément Bœsch
On Tue, Dec 29, 2015 at 09:28:34AM -0800, Ganesh Ajjanagadde wrote: > The table is highly structured, so pow (or exp2 for that matter) can entirely > be avoided, yielding a ~ 40x speedup with no loss of accuracy. > > sample benchmark (Haswell, GNU/Linux): > new: > 4449 decicycles in init_pow2table

[FFmpeg-devel] [PATCH] lavc/cook: get rid of wasteful pow in init_pow2table

2015-12-29 Thread Ganesh Ajjanagadde
The table is highly structured, so pow (or exp2 for that matter) can entirely be avoided, yielding a ~ 40x speedup with no loss of accuracy. sample benchmark (Haswell, GNU/Linux): new: 4449 decicycles in init_pow2table(loop 1000), 254 runs, 2 skips 4411 decicycles in init_pow2table(loop 1