Re: GCL slow reading files

Raymond Toy <[email protected]>
Newsgroups gmane.comp.mathematics.maxima.general
Message-ID <[email protected]>
On 4/10/26 8:27 AM, Raymond Toy wrote:

> On 4/10/26 12:27 AM, David Scherfgen wrote:
>
>> Raymond Toy <[email protected]> schrieb am Fr., 10. Apr. 2026, 00:27:
>>
>>     On 4/9/26 8:33 AM, Leo Butler wrote:
>>
>>>     To see what I mean, start a fresh maxima+gcl build and do:
>>>
>>>     showtime:true $
>>>     load(draw);
>>
>>     On my fairly fast machine, ecl takes about 3.3 sec. gcl takes 65
>>     sec; ccl64, 0.57 sec; cmucl, 2.2 sec. Ccl is known for having a
>>     very, very fast compiler.
>>
>> On my machine, GCL takes 2.4 seconds to load "draw". But it uses an 
>> older version of GCL, namely 2.6.14. Maybe the "slowness" was 
>> introduced with 2.7.x.
>>
>> I could confirm that GCL 2.6.14 too is quite slow in reading files. 
>> Reading a 50 MB file took more than 4 seconds on a lightning fast 
>> NVMe SSD with ZFS and a huge cache on top.
>
> Wow, it’s much worse with 2.7.2:
>
A bit of googling pointed me to |si:fread|. For a file of (unsigned-byte 
8), it is much, much faster:

|(with-open-file (s "doc/info/maxima.info-1" :direction :input 
:element-type '(unsigned-byte 8)) (let* ((len (file-length s)) (buf 
(make-array len :element-type '(unsigned-byte 8)))) (time (prog1 t 
(si:fread buf 0 len s))))) real time : 0.010 secs run-gbc time : 0.000 
secs child run time : 0.000 secs gbc time : 0.000 secs allocation : 0 
Mbytes |

Didn’t check to see if buffer has the right values though.

&#8203;

_______________________________________________
Maxima-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.