The only difference is that 'load' will stream the file and at the same time evaluate, while the above example reads the whole file first into a string, then evaluates it.
'load' can stream very large files without a memory impact, because it evaluates s-expressions as they flow in, compiling and evaluating on the fly.
Lutz
Now with the new possibilitys of SQLite or other import function, which could give back huge strings, it might be usefull to have a command like 'eval-string' with the capabilitys of 'load'.Or is there no more difference between 'eval-string' and 'load' because memory impact has happened yet and it is nothing to optimise in 'eval-string'?
The file is a assoc-tab with 750 KB.
I should have made the test before posting.
So its seems not much overhead.
But why does 'eval-string' need different times on subsequent calls.
Speed wise I don't think that there is adifference streaming a file for evaluation by load or loading in to a buffer first, than evaluating. The memory impact when using SQLite already happened when it returns the string to to you.