Re: Procs & Funcs

new topic     » goto parent     » topic index » view thread      » older message » newer message

At 01:29 PM 5/3/98 +0530, Abhimanyu Lad wrote:

>Hi All,
>
>I've a question.
>Suppose I include a .e file full of various routines(procs. & funcs), but
>in my .ex file, I just use 1 of the routines. When I bind my .ex file,
>will all the routines be included into the EXE file or only the one I
>really used??
>
>From,
>Abhimanyu Lad
>
Good question: I tried a test:
string.e is about 6400 bytes, but it adds only about 3200 to
the compiled file when it is included (even if no routines in
string.e are called) The compiled file gets larger by a few
bites when an included routine is called: but by fewer bytes
than the call itself takes to write! Seems that the call is stored as
a "token".

TEST1    EX             34 using no includes
TEST1    EXE       176,450
TEST2    EX             52 include string.e, but make no calls
TEST2    EXE       179,668
TEST3    EX             62 call 1 routine in string.e
TEST3    EXE       179,675
TEST4    EX             85 call 1 routine in string.e twice
TEST4    EXE       179,692
TEST5    EX             90 call 2 routines in string.e
TEST5    EXE       179,690  source was 5 bytes larger than 4

--1
sequence s
s = "HELLO"
puts(1,s)

--2
include string.e
sequence s
s = "HELLO"
puts(1,s)

--3
include string.e
sequence s
s = trim("HELLO",' ')
puts(1,s)

--4
include string.e
sequence s
s = trim("HELLO",' ')
s = trim("HELLO",' ')

--5
include string.e
sequence s
s = trim("HELLO",' ')
s = expand_tabs("HELLO",5)
puts(1,s)

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu