[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Changing the Emacs engine to Guile
From: |
Pascal J. Bourguignon |
Subject: |
Re: Changing the Emacs engine to Guile |
Date: |
Wed, 08 Dec 2010 15:15:23 -0000 |
User-agent: |
Gnus/5.101 (Gnus v5.10.10) Emacs/23.2 (gnu/linux) |
Cecil Westerhof <Cecil@decebal.nl> writes:
>> this (while (re-search-forward ...)) loop modifies the line for each
>> occurence of the regexp, replacing it with (substring substitute-str 0
>> match-length), which is a different replacement string in general.
>
> Why? I would think the replacement string is the same. (When using
> single byte characters.)
With:
substitute-str = "Abcdef" ; initally
start-match = 4
end-match = 12
match-length = 8
substitute-str will become "AbcdefAbcdef",
and (substring substitute-str 0 match-length) = "AbcdefAb"
while (substring substitute-str start-match end-match) = "efAbcdef"
>> I don't know about the other implementations, but with clisp you could
>> also try to use the -C option to have your script compiled before
>> running it. On big files it might be worthwhile to spend some time
>> compiling the script.
>
> In my script I have:
> exec clisp -C "$0" "$@"
>
> That is not correct?
Oh yes. Sorry I overlooked that -C.
So the script is compiled and it should run fast on big input.
>> But my point here is that in emacs, most code is compiled or byte
>> compiled, therefore you should compare the speed of the code generated
>> by sbcl vs. guile. Benchmarking is hard.
>
> As I understood it Guile compiles before executing. That is not correct?
>
> Well, if the big time difference is nothing to worry about, I'll keep
> still. ;-}
>
> For the moment being I still prefer Emacs Lisp for scripting above
> Guile. ;-]
>
> --
> Cecil Westerhof
> Senior Software Engineer
> LinkedIn: http://www.linkedin.com/in/cecilwesterhof
--
__Pascal Bourguignon__ http://www.informatimago.com/