[vlc-devel] [PATCH 1/1] packetizer: flac: reduce memory allocations

Jean-Baptiste Kempf jb at videolan.org
Fri Nov 21 17:35:50 CET 2014


On 21 Nov, Tristan Matthews wrote :
> On Fri, Nov 21, 2014 at 4:03 AM, Jean-Baptiste Kempf <jb at videolan.org>
> wrote:
> 
> > Do you see a CPU difference?
> >
> 
> Not a huge one in the grand scheme of things, but for a given file, with
> this patch I get:
> 15 calls to realloc * 234 instructions per call + and 1 call to free * 96
> instructions per call = 3606 instructions
> VS.
> 4872 calls to malloc * 206 instructions per call +  4872 calls to free * 96
> instructions per call = 1607760 instructions
> 
> but it only saves about 0.01% CPU overall.

OK.

LGTM either.

With my kindest regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device



More information about the vlc-devel mailing list