emacs-devel
[Top][All Lists]
Advanced

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

Re: Emacs Lisp JIT Compiler


From: Clément Pit-Claudel
Subject: Re: Emacs Lisp JIT Compiler
Date: Wed, 15 Aug 2018 22:14:29 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 2018-08-15 20:32, Tom Tromey wrote:
>>>>>> "Clément" == Clément Pit-Claudel <address@hidden> writes:
> 
> Clément> I compiled and installed libjit, and things seem to build fine here.
> 
> Thank you for trying it.
> 
> Clément> Benchmarking a simple loop yields an impressive 4x speedup (from 1
> Clément> second down to 0.25s).  However, benchmarking a larger application
> Clément> seems to yield a 30% slowdown (from 5.5s to 7.5s).  I haven't
> Clément> investigated why yet.  Have you seen similar variations?
> 
> I have not really done that much benchmarking.
> However, please send me your test case (or tell me what it is) and I
> will take a look.

Hi Tom,

My simple benchmark was this, and wow did that get fast:

;; -*- lexical-binding: t; -*-

(defun test ()
  (let ((sum 0))
    (dotimes (n (* 15 1000 1000))
      (setq sum (+ sum 1))
      (setq sum (- sum 1))
      (setq sum (+ sum 1))
      (setq sum (- sum 1))
      (setq sum (+ sum 1)))
    sum))

My application benchmark that got a bit slower is essentially fontifying and 
exporting to LaTeX about 200k lines of Python code.  The app is at 
https://github.com/cpitclaudel/esh.  If you clone it you can run this:

    # Generate test data
    cd /usr/lib/python3.5/; cat turtle.py inspect.py doctest.py pydoc.py 
tarfile.py pickletools.py argparse.py > /tmp/bench.py
    # Run the benchmark
    time EMACS=/build/emacs/master/src/emacs bin/esh2tex --standalone 
/tmp/bench.py

The EMACS= part is needed because ESH starts an Emacs server in the background.

Cheers and thanks for your work!
Clément.




reply via email to

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