<div dir="ltr"><div>Hello,</div><div><br></div><div>I wrote a compiler and would like to compile a program and clone a module to run programs in parallel from different threads.</div><div><br></div><div>I'm able to clone a module easily to achieve this, but I would like to know if there is an efficient way to do it since each thread needs just a separate program data, but can share the same code. Shared code can save a lot of runtime memory.</div><div><br></div><div>Could you please share your experience of best practices as a solution for this use case?</div><div><br></div><div>Thanks for helping!</div><div><br></div><div>Best,</div><div>Aaron</div><div><br></div></div>