help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: point-at-final-line


From: Emanuel Berg
Subject: Re: point-at-final-line
Date: Sun, 28 Jan 2018 19:59:14 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Stefan Monnier wrote:

>> Seems to be virtually no difference
>> in performance.
>
> Try them in a very large buffer.

How large is very large? I wrote the below zsh
to create large files that look like this:

    1f6920fd18f25904026c59ee560f53c815dde2f854e21e40ceb3f3d58fa55ab9
    593bc90bcecd16dada33273deb2a79e593703844ccc65a2139928124357c7755
    d43d005aeb2bd1b68e264918f99e41aa175b7a9354a171631db0038c68c59f46
    09eab885d64735c3fcd49d650cf1d237025faf9e40ae356017c07fab9db2005c

With 10 000 lines there was still no
difference. With 100 000 lines and a file size
of 6.2M, the results were... identical.

create-bogus-file () {
    local file=$1
    local lines=$2
    rm -r $file
    for l in {0..$lines}; do
        dd if=/dev/urandom count=1 2> /dev/null |
            sha256sum |
            ( read rnd _; echo $rnd >> $file )
    done
}

-- 
underground experts united
http://user.it.uu.se/~embe8573


reply via email to

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