After the Inside Racket Seminar with Matthew [1], I was struck by how easy it looked to add transformations to the optimizer to turn safe calls into the unsafe calls if they are already protected by a predicate.
So, I made a really small commit that demonstrates this cf70c4a241. Please look at it on Github. The commit adds a simple transform of bytes-length to unsafe-bytes-length on (a) literal bytes and (b) identifiers previously checked by bytes?. The Github has comments about how each part works. This is in the commit, rather than the source, so as to not clutter it. Please try it yourself! It's super easy! Jay 1. https://github.com/racket/racket/wiki/Inside-Racket-Seminar-2.-Matthew-Flatt-on-Bytecode-Compiler 2. https://github.com/racket/racket/commit/cf70c4a24168643f8871d655f1700a813d68a28e -- Jay McCarthy Associate Professor PLT @ CS @ UMass Lowell http://jeapostrophe.github.io "Wherefore, be not weary in well-doing, for ye are laying the foundation of a great work. And out of small things proceedeth that which is great." - D&C 64:33 -- You received this message because you are subscribed to the Google Groups "Racket Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-dev/CAJYbDanguzVzhKHfA6jbYX42y_P_OTfj5A_7uwde7nQ5G%3Dd%2B6A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
