This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

tagbody


Hi!


I need some help/advice. The short version: Is there something like
CLs tagbody/go/return in Scheme/Kawa? If not, what would it take to
implement it?

Background: I am trying to port a CL application to Scheme/Kawa, and
have been quite successful so far. I had to write my own versions of
lots of CL functions and macros, but now about 90% of the application
works.

One big challenge was the loop macro which is used heavily in the
application. I found an implementation on the net which I was able to
adapt. This implementation made use of tagbody. I implemented
tagbody/go/return using try/catch/throw. Loop worked and I was happy. 

Now the problem is performance. It turns out that the application
spends 40 - 50% of the time in java.lang.Throwable.fillInStackTrace.
(A test run takes some 25 minutes of CPU time on my 1GHz laptop, so
performance is critical).

I then found out that the proper way of implementing tagbody in
Scheme probably is to use continuations, but I also read that Kawa
implements continuations using exceptions so I guess the difference
wouldn't be substantial.

So, do you have any suggestions? I am kind of stuck, so all comments
are appreciated! Regards,


Are Meisfjord



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]