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

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

Re: efficiency question on text manipulation using string vs buffer


From: Kevin Rodgers
Subject: Re: efficiency question on text manipulation using string vs buffer
Date: Tue, 24 Mar 2009 20:34:59 -0600
User-agent: Thunderbird 2.0.0.21 (Macintosh/20090302)

Xah Lee wrote:
emacs lisp question.

it's said that for text manipulation, operation on buffer data type is
more efficient than operation on string data type.

today, i tried to test it, but the difference seems negligible ? My
tentative test seems to indicate, that after performing 120 thousand
string replacement, the string method is only 1 second slower.
...
It appears to me, testing these commands on a text selection with
about 122k chars that needs to be replaced, the second version is only
1 second slower? (both finishes within 2 or 3 seconds, on a 2007
midrange PC)

Any comments?

The version that takes 3 seconds is 50% slower than the version that
takes 2 seconds.

--
Kevin Rodgers
Denver, Colorado, USA





reply via email to

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