You could always use transferable ArrayBuffers and serialize your data with Flatbuffers or something similar.
That being said, in all the off-main-thread apps I have written so far, the cost of structured cloning was pretty much irrelevant.
That being said, in all the off-main-thread apps I have written so far, the cost of structured cloning was pretty much irrelevant.