donderdag 21 mei 2009

Super Interpreter

This is just a random idea I was having.

I am a big fan of programming language features such as reflection, inheritance and traits.
The reason for this is that it makes your code a lot more structured and easier to use.
However, usually, overusing these features also results in a huge drop in performance and memory usage spikes.

I assume this is because the processor has to continuously switch contexts, which requires a lot of memory and computing power (ie. the processor likes large stacks of code statements the most)

In order to solve this problem, there should be one program that has knowledge of this programming language features, and can also convert code to assembly.

Now what this program should do, is foresee which code is going to be executed.
Then it has to pick all the code from the functions, traits and whatever and build assembly code.
It should then merge several fragments of code into one long list (much like js-minify or css-minify) and execute it.

Anyone having thoughts about this? Feel free to reply.

Geen opmerkingen:

Een reactie posten