Hi Neil, Neil Jerram <[EMAIL PROTECTED]> writes:
> - For the memoization of globals, I'd like to see what a patch looks > like that contains only this. We would need some kind of > declaration to say "memoize globals in the following code", and it > feels obvious to me that this declaration should have lexical scope > - in other words, the declaration affects the code that it looks > like it affects. I think this means that we have to use a source > property and mark expressions as they are read .... but I leave the > details of this to you. Yes, that's probably the best thing we can do, although it complicates a bit the compilation/memoization phase (namely, instead of `if (SCM_INLINE_MODE_P)', a more complex and potentially costly test has to be performed). > - To make sure that we don't lose your research, I suggest you create > a new directory "performance" in the CVS "workbook" module (parallel > to guile-core), and store your discussion results (per your emails) > in a suitably-named file there. Ok, I'll try to look at it (but beware: I'm a bit lazy). > Finally, can I ask whether you are doing this work because you are > trying to meet a specific performance target? If so, what is the > target and how far away from it are you at the moment? I do not have any specific performance target in fact: I'm just trying to learn and play with Guile to see how it can be made faster. :-) My main motivation is that Guile is very slow, and I believe that this can significantly restrict the applications where people would consider using it. By very slow, I mean compared to other interpreters, even compared to sister implementations like SCM and... Guile 1.4. It's also an order of magnitude slower that Bigloo's interpreter, for instance. One can notice this by running simple programs like loops, etc. Initially, after spending some time playing with Guile's GC, I managed to (wrongfully?) convince myself that the GC may be responsible for an important part of Guile's relative slowness. Alas, my first experiments with Boehm GC were not conclusive performance-wise (although this still needs to be studied in more details). The motivation for this inlining/memoization thing was that I believed that calls to those small built-in procedures incurred significant overhead (several C function calls to execute just a few instructions) and could be quite easily avoided this way. At the same time, I thought it would be nice to have this kind of optimization rather than rewrite Scheme code in C. Thanks for your analysis and advice. It's always pleasant to get detailed feedback like this. Ludovic. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel