Carl Eugen Hoyos <ceffm...@gmail.com> 于2018年12月17日周一 上午8:29写道: > > 2018-12-16 14:19 GMT+01:00, Steven Liu <l...@chinaffmpeg.org>: > > move the two if condition out of the loop, that can less > > n-1 times than condition in loop. > > Please add some benchmarks to the commit message.
Hi Folks, I tested the performance of the modify, before the patch: MacBook:dash StevenLiu$ bash get_performance.sh 3921 after the patch: MacBook:dash StevenLiu$ bash get_performance.sh 3723 MacBook:dash StevenLiu$ cat get_performance.sh get 10 times data of the speed, and compute an average value, the script as is bellow: #!/usr/bin/bash DURATION=0 for((i=0;i<10;i++)) do ./libavcodec/tests/fft -n 15 &>output T_DURATION=`grep "duration" output | awk -F"=" '{ print $2}'` DURATION=`expr $DURATION + $T_DURATION` done TOTAL=`expr $DURATION / 10` echo $TOTAL > > Carl Eugen > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel