Suprised no one has posted https://blog.cloudflare.com/binary-ast/ . Its not bytecode but its still a great idea
Must read.
https://github.com/binast/binjs-ref from below is part of this!
You get pretty good improvements by converting ASTs into SoA representation, interleaving them, and then compressing them. Fast to decode, too.