Optimizing GoAWK with a bytecode compiler and virtual machine
79 views
Skip to first unread message
ben...@gmail.com
unread,
Feb 3, 2022, 4:38:46 PM2/3/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
Recently I switched (so to speak) my GoAWK interpreter from using a tree-walking interpreter to a bytecode compiler with a virtual machine, and got a noticeable performance boost. Write-up here if you're interested: https://benhoyt.com/writings/goawk-compiler-vm/
TLDR: It's significantly more code, but also 10-20% faster. It'll get even faster when Go implements "switch" using jump tables (looking forward to https://go-review.googlesource.com/c/go/+/357330/).
-Ben
Kamil Ziemian
unread,
Feb 3, 2022, 5:17:51 PM2/3/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message