chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] lambda names in profile-output


From: Andre Kuehne
Subject: Re: [Chicken-users] lambda names in profile-output
Date: Sat, 21 Apr 2007 01:35:50 +0200
User-agent: Thunderbird 1.5.0.10 (X11/20070221)

Andre Kuehne wrote:
I haven't figured out yet under what circumstances lambda-calls get profiled.
Sometimes i get lots of profile-entries like these:

...
g1710 10100 0.512 0.069 77.1084 g1708 101 0.512 0.005 77.1084 g1905 10000 0.336 0.36e 50.6024
...

However, some tests showed me, that not all lambdas get profiled. Can someone tell me, what the restrictions are?

I did some further tests and found that the inclusion of "(use syntax-case)"
makes the lambda-names disappear:

> cat test1.scm

(define (make-func n)
  (let ((func (lambda (x) (+ n x))))
    func))

((make-func 1) 1)

> csc -profile test1.scm && ./test1 && chicken-profile
procedure                                  calls   seconds   average  percent
-------------------------------------------------------------------------------
func                                           1     0.000     0.000   0.0000
make-func                                      1     0.000     0.000   0.0000

> cat test2.scm

(use syntax-case)

(define (make-func n)
  (let ((func (lambda (x) (+ n x))))
    func))

((make-func 1) 1)

> csc -profile test2.scm && ./test2 && chicken-profile
procedure                                  calls   seconds   average  percent
-------------------------------------------------------------------------------
make-func                                      1     0.000     0.000   0.0000
g1531                                          1     0.000     0.000   0.0000


Best Wishes
Andre Kühne





reply via email to

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