annotations-tree branch ready for test/merge

Peter Lobsinger plobsing at gmail.com
Tue Jan 25 20:21:40 UTC 2011


The annotations-tree branch changes the way we store annotations to
make these more space-efficient and faster to look up. Whereas before,
to lookup annotations required multiple linear scans of various arrays
within the annotations table, now entries are contained in ordered
lists per-annotation-key and we can use a binary search to look them
up.

The down side is that the cost of building these new annotations is
probably between O(God No) and O(F@%#). However, I have not seen a
noticeable cost increase in practice, even creating rakudo's perl6.pbc
(277316 lines of PIR, 17106 annotations). This can be improved (eg: by
not building in-place) if this becomes an issue.

One immediate benefit is that the profiling runcore can now be run
with source-line-annotations turned on at no noticeable increase in
running time (at least for perl6 startup). The ultimate goal is to
make using the annotations system a feasible solution for storing
other statically-known properties of bytecode (eg: exception
handlers).

The branch is currently failing some tests for me with the same
failures I'm experiencing with master (apparently introduced with the
recent IPv6 features). I am seeing no introduced failures. However,
please test this wherever and with whatever you see fit.


More information about the parrot-dev mailing list