Re: overwriting an existing file is much slower than creating a new one
Kai Torben Ohlhus <[email protected]>
| Newsgroups | gmane.comp.gnu.octave.maintainers |
|---|---|
| Message-ID | <[email protected]> |
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