Path: csiph.com!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Jon Forrest Newsgroups: comp.compilers Subject: Is This a Dumb Idea? paralellizing byte codes Date: Sat, 22 Oct 2022 11:00:36 -0700 (PDT) Organization: Compilers Central Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <22-10-046@comp.compilers> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="60587"; mail-complaints-to="abuse@iecc.com" Keywords: question, optimize, interpreter Posted-Date: 22 Oct 2022 14:51:29 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:3216 Modern CPUs employ all kinds of clever techniques to improve instruction level parallelism (ILP). I was wondering if it makes sense to try to employ similar techniques in the virtual machines used to execute byte code produced by language compilers. By that I mean what if virtual machines were to examine byte code streams to detect when it would be safe to execute multiple byte codes concurrently? Then, based on its findings, the virtual machine would execute as many byte codes concurrently as is safe. I have no idea if the overhead of the byte code examination would exceed any advantage of the concurrent execution, although it's important to point out that this examination would only have to be done once, and the results could somehow be stored along with the byte code. Of course, if the byte code changes the examination would have to be done again. I'm also worried that internal virtual machine locking requirements might make this idea infeasible. For example, in a virtual machine with a global interpreter lock, would it be possible for there to be any concurrent execution? This idea, if it works, would be a great way to take advantage of multiple cores without having to rewrite any user code. The big question is whether it would work. Comments? Jon Forrest