Skip to main content
gamedev.net
🔒 Locked

Optimizing code generation

Started by Shadow Jul 13, 2004 at 3:44 PM 0 replies 600+ views
Original Post
Shadow
Shadow
I have recently completed a scripting language and now i am working on the optimizer. The way i am doing it is check for patterns of instructions and replace them with a simpler equivalent, it's working very very good, but.. Isn't there a way of optimizing using AI? The only methods i've seen so far are simple "if this operation=x and last=y, replace with z". Wouldn't it be better something like give the system the behavior of all opcodes and it would then optimize completly using some AI technique. Is there any research into this? I couln't find any.
SiCrane
SiCrane
There have been AI techniques applied to program optimization. For example, Critticall seems to apply some sort of genetic algorithm on code. I have a friend who's a grad student working on some hellaciously arcane graph theory techniques that uses neural networks as a research project. But on the whole, many of the most effective techniques are of simple search and replace style methods. Between things like inlining, peephole optimizations, and DFA you can squeeze a lot out of most code. But IMO, the most promising techniques in the future seem to lie in profile assisted optimizations rather than heuristic based optimizations.

Off topic: long time no see, Shadow. :)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.