FarragoCalcPerformance
From Eigenpedia
This page is for recording our progress on profiling and tuning the SQL expression calculator implementations in Farrago.
FarragoCodeGenDebugging explains how to study the generated code for the Java calc. Packages net.sf.farrago.runtime and net.sf.farrago.type.runtime provide the underlying runtime library on which the generated code depends.
net.sf.farrago.test.FarragoRexToOJTranslatorTest is a unit test for code-generation of various expressions in isolation. Results are currently generated+diffed in farrago/testlog/FarragoRexToOJTranslatorTest directory; converting the test to use org.eigenbase.test.DiffRepositoryTest might make it easier to maintain.
Some old farrago-dev posts on the subject:
- http://sourceforge.net/mailarchive/message.php?msg_id=9163380
- http://sourceforge.net/mailarchive/message.php?msg_id=9176926
Some known performance issues with the Java calc:
- Janino compile slooow
- program temp variables are being expanded instead of evaluated only once
- casts and assignments are often repeated redundantly
- many cast implementations are very inefficient
- implementations for some operators such as string comparison are very inefficient
- implementations for some operators make a lot of work for the garbage collector

