[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #43327] dir function is too slow
From: |
Kai Torben Ohlhus |
Subject: |
[Octave-bug-tracker] [bug #43327] dir function is too slow |
Date: |
Wed, 7 Aug 2019 22:14:08 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36 |
Follow-up Comment #10, bug #43327 (project octave):
On my machine Octave 5.1.0:
>> system ('ls -al /usr/bin/ | wc -l'); tic; l = dir ('/usr/bin/'); toc
3254
Elapsed time is 0.63308 seconds.
Octave dev (728e4d99febb):
>> system ('ls -al /usr/bin/ | wc -l'); tic; l = dir ('/usr/bin/'); toc
3254
Elapsed time is 0.665946 seconds.
So I agree on your measurement Rik, about 6000 files per second. And just for
curiosity Matlab R2019a:
> system ('ls -al /usr/bin/ | wc -l'); tic; l = dir ('/usr/bin/'); toc
3254
Elapsed time is 0.016233 seconds.
This makes for Matlab roughly 200,000 files per second.
Regarding the original message, there is still no real improvement. Assuming
"100kk = 1e8 = 100,000,000" files, this still means
>> 1e8/6000/3600
ans = 4.6296
four hours of waiting. Matlab
>> 1e8/2e5/60
ans = 8.3333
needs eight minutes. I think my definition of "kk" differs from the OP.
Bottom line, the performance is good enough for the average user today and I
suggest to close as won't fix.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?43327>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/