emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Skipping unexec via a big .elc file


From: Simon Leinen
Subject: Re: Skipping unexec via a big .elc file
Date: Sun, 30 Oct 2016 16:31:27 +0100

On Sun, Oct 30, 2016 at 3:43 PM, Ken Raeburn <address@hidden> wrote:
> I switched over to a pair of hash tables and the run time is just under 0.2s 
> on my test machine now.  Profiling reports are now topped by read1, readchar, 
> and readbyte_from_file (now including the expanded getc_unlocked calls), 
> accounting for about 30% of the CPU time between them.  The hash functions 
> and substitute_object_recurse are not taking a significant amount of time. 
> [...]

Promising!

Years ago I spent some time optimizing the MIB-reading code in
UCD/Net-SNMP, and found that the biggest win was to treat the input
file as one big buffer (I actually mmap()ped it) and then avoid most
of the memory allocation overhead of token creation by using start/end
pointers directly into that buffer.  I never upstreamed that code, and
I'm not sure the representation would have been acceptable to the
other developers.  But it sure was fast.  Maybe an approach like that
would be suitable for .elc loading.
-- 
Simon.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]