I am working on a project for modeling robotic dynamics. It requires to compile very very long c++ expressions produced by a symbolic tool. One of the long expressions is 28 million characters long. I am using current Linux Ubuntu and g++, (gcc 4.8.4). My make file tries to compile it with
The g++ has been running for a few hours with 99% CPU and 50% of memory load. I wonder the g++ has limitations on how long the expression can be? My symbolic tool can't simply the expression further. What other things I can try to compile and run my code?
Geez, that poor GCC.
What sort of operations are in these expressions? Any function calls, or only unary and binary operators?
In the latter case, you could probably make it easier for the parser by reducing your expression to RPN form and generating your code like this:
Even though it is still running, I think the compilation died after 3 hours since It is using only 4% of CPU while using 80% of memory on my laptop computer. Any suggestions are welcome.