Re: strange behavior of EU to C translator
- Posted by Robert Craig <rds at RapidEuphoria.com> Mar 18, 2001
- 426 views
Jerry Story writes: > I tried the EU to C translator on my Diet Monger @$$ Kicker > program, for LCC-WIN. The translator produced almost > 500 C files. Most of them were 320K. main_328.c was > 13 megs. init_.c was 15 megs. Way too much C code. > The total Euphoria code, mostly data, is about 2 megs. > What's happening? I tried it too, and with the beta-1 Translator I got similar results (460 .c files). The beta-2 (under development) Translator was somewhat better. init_.c was reduced from 16Mb to 6.8Mb. main_.h was cut from 4.7Mb to 1.9Mb. Some of the other .c files were shrunk a bit. Still pretty bad. The reason is that your program source code contains something like 350,000 floating-point numbers, plus 15,000 or so strings, plus thousands of complex sequences. The way I've set things up, each of these items needs a few lines of C code to declare it and initialize it. With the interpreter, you can just list all the numbers 10 or so per line, very compactly. I think Euman ran into similar problems. I'll see what I can do to improve the situation, but you could solve the problem yourself by reading the data from a data file (or EDS database) rather than initializing the data with Euphoria declarations inside your program source. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com