Development Tools
Posted in 2001
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Server Administration, Versions, Editions & End-of-Life
Hey gang! There's been a big discussion at work recently about the differences/advantages of using 4GL in RDS mode or compiled mode. The information from Informix was either off of their web site or was a document 8+ years old. My experience with Online 5.X was that compiled code was faster and smaller than RDS code, and that an ESQL/C batch program could be 4-6 times faster than the equivalent 4GL program depending on how it was written. Does anyone have any more timely information about this topic? We're currently running IDS 7.31UC5 with the 4GL-RDS runtime. Would compiling the programs gain anything? Thanks, James Ferrill DBA PCCA Inc.
In the year of Our Lord Tue, 13 Feb 2001 11:24:58 -0600, "James Ferrill" <jferrill@pccarx.com> spake, saying: >There's been a big discussion at work recently about the >differences/advantages of using 4GL in RDS mode or compiled mode. The >information from Informix was either off of their web site or was a document >8+ years old. My experience with Online 5.X was that compiled code was >faster and smaller than RDS code, and that an ESQL/C batch program could be >4-6 times faster than the equivalent 4GL program depending on how it was >written. > >Does anyone have any more timely information about this topic? We're >currently running IDS 7.31UC5 with the 4GL-RDS runtime. Would compiling the >programs gain anything? It has been an age since I did any benchmarks, but the synopsis was: 1. As far as interactive use goes, there's not really much to choose. 2. A well-written batch could be up to 25% faster compiled than RDS. 3. I cannot imagine how a compiled program could be smaller than an RDS program.
Compiled programs were MUCH LARGER than the RDS version. Runner program has all the 'c' functions, etc compiled into it but that is only one program vs 100+ compiled programs on most systems. Alright so we did have a second runner to work with batch programs but... Speed really isn't an issue any more, especially for interactive programs. IMHO. Rob Vorbroker Obnoxio The Clown <obnoxio@hotmail.com> wrote in message news:3a898894.23297730@130.133.1.4... > In the year of Our Lord Tue, 13 Feb 2001 11:24:58 -0600, "James Ferrill" > <jferrill@pccarx.com> spake, saying: > > >There's been a big discussion at work recently about the > >differences/advantages of using 4GL in RDS mode or compiled mode. The > >information from Informix was either off of their web site or was a document > >8+ years old. My experience with Online 5.X was that compiled code was > >faster and smaller than RDS code, and that an ESQL/C batch program could be > >4-6 times faster than the equivalent 4GL program depending on how it was > >written. > > > >Does anyone have any more timely information about this topic? We're > >currently running IDS 7.31UC5 with the 4GL-RDS runtime. Would compiling the > >programs gain anything? > > It has been an age since I did any benchmarks, but the synopsis was: > > 1. As far as interactive use goes, there's not really much to choose. > 2. A well-written batch could be up to 25% faster compiled than RDS. > 3. I cannot imagine how a compiled program could be smaller than an RDS program. >
James Ferrill wrote in message <3a896dba$1_1@newsa.ev1.net>... >Hey gang! Hey Hey! >My experience with Online 5.X was that compiled code was >faster and smaller than RDS code 1) Faster - maybe. A little bit. Occasionally. Depends. Most of the generated code is calls to C functions which do things. RDS uses pcodes to direct the runner to call C functions which do things... Not much in it really! If you examine the generated C code, even a plain ole' maths expression is a bunch of function calls because of the need to support nulls. 2) Smaller - are you kidding? Or talking about the runtime memory footprint? One team here is obsessed with C compiling, and they've also put in a huge amount of work to use shared libraries. The .4ge is still about 3 times bigger than the .4gi. However, RDS cannot share anything in memory. C compiled can share so-called "text" of the running program - ie the compiled code - so for any program being executed by 50 users, you will be saving the size of the executable space. Of course the runtime variables will not be shared (well, duhhhh) but even for programs used simultaneously by around 5 people you will see some savings in runtime performance. I wouldn't bother C compiling EVERYTHING unless you can crack the shared libraries AND your applications use libraries extensively. If you can't get sharing thru shared libraries, then why bother C compiling a program that's only run once a month or even just once an hour? 3) Program startup time used to be better, but these days, with processors 50 times faster than 5 years ago, it's becoming hard to notice. May be noticable and significant on a heavily loaded machine.
Now for some proof-reading... Andrew Hamm wrote in message <3a89beed$1@news.iprimus.com.au>... > >space. Of course the runtime variables will not be shared (well, duhhhh) but >even for programs used simultaneously by around 5 people you will see some >savings in runtime performance. That should say: runtime memory usage. Savings in runtime memory brings indirect but important performance benefits generally.
Just a tinge more proof-reading, and another thought on the subject: Andrew Hamm wrote in message <3a89beed$1@news.iprimus.com.au>... > >so for any program >being executed by 50 users, you will be saving the size of the >executable space. > Times about 50 - a no-brainer really. The word from the C-compile everything team using shared libraries is that the shared libraries actually seem to slow down program load a little bit, but not to the point of being slower than RDS to startup, so it's a very acceptable trade-off.