avcodec/cbrt_tablegen: speed up dynamic table creation
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>
Wed, 25 Nov 2015 21:59:07 +0000 (16:59 -0500)
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>
Wed, 2 Dec 2015 00:05:19 +0000 (19:05 -0500)
commit2f5075f5513fdec21ddba802af0f2433fcfd430e
treee7851f6ef3e2ee88cd828208ea342240118e95f2
parent1d0c94ddaef8225c75f72d5d8c54c34270f88d80
avcodec/cbrt_tablegen: speed up dynamic table creation

On systems having cbrt, there is no reason to use the slow pow function.

Sample benchmark (x86-64, Haswell, GNU/Linux):
new:
5124920 decicycles in cbrt_tableinit,       1 runs,      0 skips

old:
12321680 decicycles in cbrt_tableinit,       1 runs,      0 skips

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
libavcodec/cbrt_tablegen.h
libavcodec/cbrt_tablegen_template.c