---------------------------- Original Message ---------------------------- Subject: parenspeed From: [EMAIL PROTECTED] Date: Sun, February 10, 2008 8:05 pm To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] --------------------------------------------------------------------------
i was working on a new javascript compiler (compiled part is the render. Assume usual parenscript js interpreter: SERVER> (js ((lambda (a b) (if a (- a b) (+ a b))) 3 4)) "(function (a, b) { if (a) { a - b; } else { a + b; }; }) (3, 4);" New compiler: SERVER> (js+ ((lambda (a b) (if a (- a b) (+ a b))) 3 4)) inside LAMBDA-APPLICATION-FORM inside APPLICATION-FORM inside IF-FORM inside VARIABLE-REFERENCE inside APPLICATION-FORM inside VARIABLE-REFERENCE inside VARIABLE-REFERENCE inside APPLICATION-FORM inside VARIABLE-REFERENCE inside VARIABLE-REFERENCE inside LAMBDA-FUNCTION-FORM inside VARIABLE-REFERENCE inside VARIABLE-REFERENCE inside CONSTANT-FORM inside CONSTANT-FORM "(function (a,b) { if (a) { (a - b); } else { (a + b); } })(3,4);" SERVER> Let's check speed on quad.core.gen.tr: Parenscript results: SERVER> (time (loop for i from 0 upto 100000 do (js ((lambda (a b) (if a (- a b) (+ a b)) 3 4))))) Evaluation took: 17.282 seconds of real time 17.061066 seconds of user run time 0.48403 seconds of system run time [Run times include 2.025 seconds GC run time.] 0 calls to %EVAL 0 page faults and 3,441,972,576 bytes consed. NIL New compiler results: SERVER> (time (loop for i from 0 upto 100000 do (js+ ((lambda (a b) (if a (- a b) (+ a b)) 3 4))))) Evaluation took: 12.562 seconds of real time 12.508781 seconds of user run time 0.116007 seconds of system run time [Run times include 0.5 seconds GC run time.] 0 calls to %EVAL 0 page faults and 902,786,864 bytes consed. NIL Interestingly new compiler is fast. Also, mem usage is 2/3 or 3/4 decreased. Hope to implement indentation and more tests. Evrim. _______________________________________________ cs-lisp mailing list cs-lisp@cs.bilgi.edu.tr http://church.cs.bilgi.edu.tr/lcg http://cs.bilgi.edu.tr/mailman/listinfo/cs-lisp