From: SourceForge.net <no...@so...> - 2008-02-03 16:22:17
|
Patches item #1880809, was opened at 2008-01-27 13:25 Message generated for change (Comment added) made by y-d You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=301355&aid=1880809&group_id=1355 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Yann Nicolas Dauphin (y-d) Assigned to: Nobody/Anonymous (nobody) Summary: JIT via lightning Initial Comment: Still incomplete JIT compiler for CLISP. The jit compilation occurs at every function call(no reuse), so it runs slower for now. Lightning is used because: - It's portable. Can reportedly be ported under a day. - It's simple. If the GNU lightning project was to stop, it wouldn't be a problem. Maintaining it is easy. Not so for LLVM. - It's lean and mean. Code generation is straightforward, so very fast. Tested on x86 with: - Linux - Mac OS X: Must 'export DYLD_BIND_AT_LAUNCH=' for now because the dynamic linker messes with jit function calls The patch is too big for SF so: http://www.step.polymtl.ca/~polyrad/polyrad/jit-clisp-2.43.patch ---------------------------------------------------------------------- >Comment By: Yann Nicolas Dauphin (y-d) Date: 2008-02-03 11:22 Message: Logged In: YES user_id=1993164 Originator: YES Lightning vs Libjit Technical: Libjit is well written and looks lovely, but Lightning too. The main differences are that Libjit is more high-level (Auto register allocation, memory allocation, ...) and that it optimizes the code a bit. This is why I first considered using libjit. But [1] shows that an optimizing(as in AOT compilers) compiler working at a low-level is not dramatically faster that a template based JIT compiler(like lightning). For significant performance improvements, using trace based JIT compilation with Trace SSA code analysis as described in [2] is the best alternative. This approach requires control over register allocation and optimizes the code. This makes much of libjit features redundant. Social: Shortly: Lightning is more active. GNU Smalltalk, MzScheme, OcamlJIT, Rubinius(in FFI module) use it. MzScheme achieves good performance with it[3]. No active project uses libjit. Which is a shame, since it's a good lib. The current version of libjit only supports 1 architecture while Lightning supports 4. And it seems that number will keep on growing. It's risky to use Libjit. [1] http://research.sun.com/techrep/2000/abstract-87.html Also note the speed up over a simple switch based interpreter for number crunshing. [2] http://www.usenix.org/events/vee06/full_papers/p144-gal.pdf This has the merit of optimizing 0 (CONST&PUSH 0) ; 2 1 (CONST 1) ; (4) 2 (CONS) So that 0 and 1 don't push anything on the stack and get directly passed in registers (if possible). [3] http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=all ---------------------------------------------------------------------- Comment By: Yann Nicolas Dauphin (y-d) Date: 2008-01-30 01:53 Message: Logged In: YES user_id=1993164 Originator: YES jit-clisp-cvs-20080131.patch.gz: This new patch includes the clean ups from Reini and will work against a clean checkout from CVS. Please install the latest version of GNU lightning(at least 1.2b): http://git.savannah.gnu.org/gitweb/?p=lightning.git;a=snapshot;h=master It includes: - Modifying make file to add jit.d with jit.h as one of it's depedencies - Assuming GNU Lightning is installed - lispbibl sets USE_JIT if I80386 is set and registers are saved if !USE_JIT - Replacing all // comments with /**/ and tabs with spaces - Removed vestigial c source and jit_begin/end - Random cleanups News tests have been added to 'make check'. CLISP runs out of memory on one of the last ones, 'ctak'. This is because using longjmp can cause the memory of codeBuffer to leak. This is of course resolved by reusing the jit function. libjit vs lightning coming up. File Added: jit-clisp-cvs-20080131.patch.gz ---------------------------------------------------------------------- Comment By: Sam Steingold (sds) Date: 2008-01-28 18:25 Message: Logged In: YES user_id=5735 Originator: NO clean-up? http://permalink.gmane.org/gmane.lisp.clisp.devel/17523 http://rurban.xarch.at/cygr/clisp/jit-extra.patch.gz ---------------------------------------------------------------------- Comment By: Sam Steingold (sds) Date: 2008-01-28 18:22 Message: Logged In: YES user_id=5735 Originator: NO lightning vs libjit http://permalink.gmane.org/gmane.lisp.clisp.general/12114 ---------------------------------------------------------------------- Comment By: Sam Steingold (sds) Date: 2008-01-28 17:00 Message: Logged In: YES user_id=5735 Originator: NO it would be nice if you could elaborate on advantages of lightning over libjit http://freshmeat.net/projects/libjit/ ---------------------------------------------------------------------- Comment By: Sam Steingold (sds) Date: 2008-01-27 21:14 Message: Logged In: YES user_id=5735 Originator: NO http://article.gmane.org/gmane.lisp.clisp.devel:17497 http://article.gmane.org/gmane.lisp.clisp.devel:17509 http://article.gmane.org/gmane.lisp.clisp.devel:17515 ---------------------------------------------------------------------- Comment By: Sam Steingold (sds) Date: 2008-01-27 19:52 Message: Logged In: YES user_id=5735 Originator: NO the patch is too big because it includes some binary files (.DS_Store) and the full sources for lightning. please assume that lightning is installed on the developer's machine. please include only the eval.d and jit.h, NOT lightning sources please do NOT use "//" comments ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=301355&aid=1880809&group_id=1355 |