Hi!

I was looking at the code for bytevector-ref, vector-ref, struct-ref and
it's pretty
conclusive that there is a hugh overhead of implementing those. We are
talking of 30-40 instructions that has to be put into native code. Now most
of this code is working with registers so it's not that bad. But The code
size will be hugh for vector oriented and struct oriented code. On the
other hand the call overhead will not be that large compared to all those
instructions so we could simply use the C corresponding C-functions
directly. What's interesting though for a more elaborate native translation
is if the compiler (or the user demands it) for unsafe versions of these
accessors (I saw that we have class-of as a dengerous version of
struct-ref). The idea here would be to add similar unsafe instructions for
later use. They will then most certainly lead to a very efficient execution
of many algorithms in guile.

Regards
Stefan

Reply via email to