all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: question about speed of sequential string replacement vs regex or
       [not found]   ` <4f37d1f2-699a-4646-a243-cbb3558989c2@j1g2000yqj.googlegroups.com>
@ 2011-09-28 17:00     ` Willem
  0 siblings, 0 replies; only message in thread
From: Willem @ 2011-09-28 17:00 UTC (permalink / raw)
  To: help-gnu-emacs

Xah Lee wrote:
) the question originally came from when i was coding elisp of a
) function that changes html entities to unicode char literal. The
) problem is slightly complicated, involving a few questions about speed
) in emacs. e.g. string vs buffer, and much more... i spent several
) hours on this but it's probably too boring to detail (but i'll do so
) if anyone wishes). But anyway, while digging these questions that's
) not clear in my mind, i thought of why not generate a regex or
) construct and do it in one shot, and wondered if that'd be faster. But
) afterwards, i realized this wouldn't be applicable to my problem
) because for my problem each string needs to be changed to a unique
) string, not all to the same string.

In Perl, it would be applicable.  You see, in Perl, you can call a function
in the replacement of the regex substitution, which can then look up the
html entity and return the wanted unicode literal.

I think you can do that in some other languages as well.


SaSW, Willem
-- 
Disclaimer: I am in no way responsible for any of the statements
            made in the above text. For all I know I might be
            drugged or something..
            No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-09-28 17:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <0062679d-6cde-4e61-baff-3a7289ac5090@t11g2000yqa.googlegroups.com>
     [not found] ` <86bou553yv.fsf@red.stonehenge.com>
     [not found]   ` <4f37d1f2-699a-4646-a243-cbb3558989c2@j1g2000yqj.googlegroups.com>
2011-09-28 17:00     ` question about speed of sequential string replacement vs regex or Willem

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.