gcl-devel
[Top][All Lists]
Advanced

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

[Gcl-devel] GCL Fork based parallelism


From: Camm Maguire
Subject: [Gcl-devel] GCL Fork based parallelism
Date: 22 Jun 2007 18:49:12 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Greetings!  Just committed a quick fix to get this working again in
the new dlopen access to external libs mechanism.  More discussion
later if desired.

Warning: at present there is no limit to the number of forks -- this
is forthcoming.

Take care,

>(in-package 'si)

#<"SYSTEM" package>

SYSTEM>(defun fib (x) (cond ((= x 1) 1) ((= x 2) 1) ((+ (fib (1- x)) (fib (- x 
2))))))

FIB

SYSTEM>(defun fib1 (x) (si::p-let ((w (fib (1- x)))(z (fib (- x 2)))) (+ w z)))

FIB1

SYSTEM>(compile 'fib)

;; Compiling /tmp/gazonk_20137_0.lsp.
;; End of Pass 1.  
;; End of Pass 2.  
;; OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3, 
(Debug quality ignored)
;; Finished compiling /tmp/gazonk_20137_0.o.
;; Loading /tmp/gazonk_20137_0.o
 ;; start address -T 0x84f170 ;; Finished loading /tmp/gazonk_20137_0.o
#<compiled-function FIB>
NIL
NIL

SYSTEM>(compile 'fib1)

;; Compiling /tmp/gazonk_20137_0.lsp.
;; End of Pass 1.  
;; End of Pass 2.  
;; OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3, 
(Debug quality ignored)
;; Finished compiling /tmp/gazonk_20137_0.o.
;; Loading /tmp/gazonk_20137_0.o
 ;; start address -T 0x86cbc0 ;; Finished loading /tmp/gazonk_20137_0.o
#<compiled-function FIB1>
NIL
NIL

SYSTEM>(time (fib 30))

real time       :      0.020 secs
run-gbc time    :      0.020 secs
child run time  :      0.000 secs
gbc time        :      0.000 secs
832040

SYSTEM>(time (fib 40))

real time       :      2.550 secs
run-gbc time    :      2.550 secs
child run time  :      0.000 secs
gbc time        :      0.000 secs
102334155

SYSTEM>(time (fib1 40))

real time       :      1.590 secs
run-gbc time    :      0.000 secs
child run time  :      2.540 secs
gbc time        :      0.000 secs
102334155

SYSTEM>
-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

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