Hi, Marius Vollmer <[EMAIL PROTECTED]> writes:
> Kevin Ryde <[EMAIL PROTECTED]> writes: > >> (I notice "write" style string output in iprin1() always goes >> char-by-char, it'd be nice if it scanned ahead for a char needing an >> escape, to send the non-escape block as a single lfwrite. Decent size >> runs of plain chars are probably quite likely.) > > I like this variant best. I don't think that writing strings with > lots of escape sequences to an unbuffered port happens often enough to > justify implementing a second buffering mechanism. > > When outputting an escaped char, we can additionally assemble the > escape sequence in a fixed size buffer and then output that in one go. I think you overlooked my patch. :-) It also assumes that outputting escaped characters is pretty rare. Therefore, it only relies on a fixed-size buffer (whose size is that of the string plus a few bytes). This buffer gets filled in in _one_ string traversal if there are no (or not a lot of) escaped characters. So the string doesn't need to be traversed earlier, and escaped chars need not be sent alone to `scm_lfwrite ()'. Well, anyway, that's not such a big deal. ;-) Thanks, Ludovic. _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user