Re: Ver 4.0 start up speed.

new topic     » goto parent     » topic index » view thread      » older message » newer message
bernie said...
mattlewis said...

I do not think that Win32Lib has yet been updated to have the proper include statements per its usage of library internal symbols. The last time I checked, there were ~6K such references from parsing Win32Lib itself.

The easiest way to speed up the start time of your code is to include the files you need from each file that needs them, and not to rely on global symbols being included by some other file.

I have no globals only public

I'll look closer at the way things are being included.

mattlewis said...

Could you please explain why "STD libraries" have been singled out for parsing avoidance? Or even what that means?

Matt

What I mean is; is each std/include file being parsed every time
they are included in a program ? Because they are full of comments
which takes up parse time. Some include files only contain one feature that is necessary for
a program; but the complete file is still parsed.

I wouldn't worry about comments. I ran the following code:

 
integer fn = open( "bernie.ex", "w" ) 
constant COMMENT = "-- This is a pretty long comment.  There will be many of them.  Let's see how long it will take to parse."  
 
for i = 1 to 10000 do 
	puts( fn, COMMENT ) 
end for 
close(fn) 

This created a 1.1M file of comments, and:

$ time exu bernie 
 
real    0m0.106s 
user    0m0.076s 
sys     0m0.020s 
Matt

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

Search



Quick Links

User menu

Not signed in.

Misc Menu