. It is 
> long 120 kb and has 3678 lines. Lines I need for my calculation 
the 
> at the most, the last 31 lines. 
> 
> When reading the file from the start:

> - it takes 12 seconds if I load the complete file to the memory 
and 
> read lines from there (interestingly, in normal programming this 
> would be exactly the opposite)


if you are using the line function to sequence through the file, 
this is very slow, as the line function scans from the start each 
time to find the line  (the i/o routines will have a pointer to the 
current line and the file probably fits mostly in memory buffer).

As has been suggested, use the line(xx,0) function to find the last 
line once.

Of if you need to visit each line and want to read them all into 
memory, create a vector of lines with vec.createfromlines



> - and too small to measure (under 1 sec) 

If you want to measure, see the perfcount and perffreq functions




Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to