Hello and thanks for writing Bigloo!
 
I have a question about performance ... I wrote this program:
 
;------------------------
(module test
        (main scm-main)
        (export
        (class TestClass)
        ))
(define-generic (test-func obj) (print "GENERIC METHOD"))
(define-method (test-func obj::TestClass) (print "TEST METHOD"))
(define (scm-main argv)
  (let ((tc::TestClass (instantiate::TestClass)))
    (test-func tc)))
;------------------------
 
Which works as expected, producing the output "TEST METHOD", but if I look at the generated C code it looks like it is calling test-func dynamically even though I have specified the class type with tc::TestClass.
 
Is there some way to make such generic functions faster by calling the correct define-method function directly if the type is known?
 
Thanks,
Bob

Reply via email to