ffmpeg/libavcodec
Ganesh Ajjanagadde e11e32686f avcodec/bitstream: replace qsort with AV_QSORT
Commit 3a0a2f33a6c955823fa4fb12c0b49cd29a496659 claims large performance
advantages for AV_QSORT over libc's qsort. The reason is that I suspect
that libc's qsort (at least on non LTO builds, like the typical FFmpeg config)
can't inline the comparison callback:
https://stackoverflow.com/questions/5290695/is-there-any-way-a-c-c-compiler-can-inline-a-c-callback-function.
AV_QSORT has two things going for it:
1. The guaranteed inlining of qsort itself. This yields a negligible
boost that may be ignored.
2. The more serious possibility of potentially allowing the comparison
function to be inlined - this is likely responsible for the large boosts
reported.

There is a comment explaining that this is a place that could use some
performance improvement. Thus AV_QSORT is used to achieve that.

Benchmarks deemed unnecessary due to existing claims about AV_QSORT.
Tested with FATE.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-18 09:22:49 -04:00
..
2015-08-22 06:16:31 +01:00
2015-10-16 16:37:40 +02:00
2015-06-14 15:09:33 +02:00
2015-10-08 23:29:18 +02:00
2015-10-16 16:37:40 +02:00
2015-10-10 09:52:18 +02:00
2015-10-10 09:52:18 +02:00
2015-07-22 23:23:29 +02:00
2015-08-18 10:24:01 -04:00
2015-10-16 16:37:40 +02:00
2015-09-10 16:36:47 +02:00
2015-04-18 14:14:24 -03:00
2015-10-13 16:03:04 +02:00
2015-05-06 17:50:09 +02:00
2015-10-11 18:03:10 -04:00
2015-09-03 13:55:38 +02:00
2015-08-18 11:48:49 -04:00
2015-10-09 22:09:08 +02:00
2015-08-11 23:16:35 +02:00
2015-07-27 16:21:14 +01:00
2015-10-10 09:52:18 +02:00
2015-08-21 08:46:05 +02:00
2015-08-21 08:46:05 +02:00
2015-09-16 11:38:20 +02:00
2015-05-20 15:50:58 +02:00
2015-10-11 17:29:50 -03:00
2015-06-17 20:11:43 +02:00
2015-10-11 16:39:41 +02:00
2015-08-18 10:24:01 -04:00
2015-10-11 17:29:50 -03:00
2015-08-18 11:48:49 -04:00
2015-09-06 14:06:44 +02:00
2015-07-22 23:23:29 +02:00
2015-08-15 15:06:01 +02:00
2015-10-16 16:37:40 +02:00
2015-08-18 11:48:49 -04:00
2015-10-09 22:09:08 +02:00
2015-09-07 15:32:08 +02:00
2015-08-03 10:12:10 +02:00
2015-10-16 16:37:40 +02:00
2015-07-27 15:24:58 +01:00