ID:116478
 
Not Feasible
Applies to:DM Language
Status: Not Feasible

Implementing this feature is not possible now or in the foreseeable future
Have any of the BYOND devs considered implementing some JIT features?

For those not in the know, JIT (Just-In-Time) compilation involves inspecting the flow of execution at run-time, and then producing custom machine code to implement this more efficiently. Languages like Java and C# use these kinds of features, as do many emulators.

As I understand it, execution flows through a BYOND proc until a sleep or spawn line is hit, at which point the event queue is inspected and a control may be switched to a different flow. If a section of a proc is executed a large number of times, it could instead be translated to a C equivalent and recompiled into a library, which would then be linked in. Then when we come to execute this section of the proc, rather than re-interpret all of the BYOND code, the compiled library function is executed instead.

Clearly this would be a lot of work (trust me when I say I know exactly how much work it would be) but it would provide potentially massive speed boosts to BYOND.

I'm more interested in seeing the BYOND devs' views on this than posing it as an actual suggestion. So, thoughts?