octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: overwriting an existing file is much slower than creating a new one


From: Kai Torben Ohlhus
Subject: Re: overwriting an existing file is much slower than creating a new one
Date: Tue, 9 Jun 2020 14:17:38 +0900
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

On 6/6/20 10:21 AM, Dmitri A. Sergatskov wrote:
> I just noticed that saving/overwriting into existing file is much slower
> that creating a new one:
> 
> octave:1> xxx = repmat (ones(2000), [1,1,4,10]);
> octave:2> tic; save xxx1.oct xxx -binary; toc
> Elapsed time is 0.835598 seconds.
> octave:3> tic; save xxx1.oct xxx -binary; toc
> Elapsed time is 3.52093 seconds.
> octave:4> tic; save xxx1.oct xxx -binary; toc
> Elapsed time is 3.47683 seconds.
> 
> Does it have to be?
> 
> Dmitri.
> -- 
> 

On my laptop system "openSUSE 15.1, XFS /home partition on SSD drive" I
do not see that drastic differences between Octave 5.2.0, 6x, and 7x as
you observed.  They are all about this:

Elapsed time is 1.06028 seconds.
Elapsed time is 1.1914 seconds.
Elapsed time is 1.18887 seconds.

Kai



reply via email to

[Prev in Thread] Current Thread [Next in Thread]