[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: string vs list processing
From: |
Michael Livshin |
Subject: |
Re: string vs list processing |
Date: |
16 Apr 2001 16:45:28 +0300 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Crater Lake) |
address@hidden (Bill Gribble) writes:
> Be smart about when you call string operations. In Gnucash, we use
> guile to assemble multi-megabyte HTML documents. You can't go around
> string-appending every "<" to "p>" to construct this size string; the
> garbage you generate is ridiculous. You will get much better
> performance if you cons up a list of component strings, reverse it at
> the end, and apply string-append to the whole list.
yup. even better (well, conceptually at least), keep your HTML
document as a tree of elements. and print it out by walking the tree.
looks nicely structured when pretty-printed, too.
[ note: all this is not to say that Guile's string operations are
extremely efficient. but IME most problems that call for fast
string operations turn out to be better much solved by different
means. ]
--
Hit the philistines three times over the head with the Elisp reference manual.
-- Michael A. Petonic
- Re: string vs list processing, (continued)
- Re: string vs list processing, Sascha Ziemann, 2001/04/16
- Re: string vs list processing, Harvey J. Stein, 2001/04/16
- Re: string vs list processing, Michael Livshin, 2001/04/16
- Re: string vs list processing, Harvey J. Stein, 2001/04/16
- Re: string vs list processing, Michael Livshin, 2001/04/16
Re: string vs list processing, Masao Uebayashi, 2001/04/16
- Re: string vs list processing, Sascha Ziemann, 2001/04/16
- Re: string vs list processing, Masao Uebayashi, 2001/04/16
- Re: string vs list processing, Michael Livshin, 2001/04/16
- Re: string vs list processing, Bill Gribble, 2001/04/16
- Re: string vs list processing,
Michael Livshin <=
- SRFI-13 again [was: Re: string vs list processing], Martin Grabmueller, 2001/04/17
- Re: SRFI-13 again [was: Re: string vs list processing], Dirk Herrmann, 2001/04/19
- Re: SRFI-13 again [was: Re: string vs list processing], Martin Grabmueller, 2001/04/19
- Re: SRFI-13 again [was: Re: string vs list processing], Marius Vollmer, 2001/04/20
- Re: SRFI-13 again [was: Re: string vs list processing], Martin Grabmueller, 2001/04/23
- Re: SRFI-13 again [was: Re: string vs list processing], Marius Vollmer, 2001/04/24
- Re: SRFI-13 again [was: Re: string vs list processing], Martin Grabmueller, 2001/04/25
- Re: SRFI-13 again [was: Re: string vs list processing], Marius Vollmer, 2001/04/30
Re: SRFI-13 again [was: Re: string vs list processing], Rob Browning, 2001/04/20
Re: SRFI-13 again [was: Re: string vs list processing], Per Bothner, 2001/04/19