Re: BUFSIZ

Daniel Jour <[email protected]>
Newsgroups gmane.lisp.clisp.devel
Message-ID <CACZHyTNYP50hc_8869YhbYf4QXn_kdWHQNBRhRLqWiyYmEB52A@mail.gmail.com>
> BUFSIZ is usually page size (4kB).

Ok, so since AFAIK we're not expecting to have deeply nested stack
frames (> 1000) this shouldn't be an issue then.

The downside of such large buffers is that this might screw up a CPU
cache line, but I'd say this would be a very speculative reason for
premature optimization :)


> Unless there is a commonly used clearly correct alternative approach,
> the "char buffer[BUFSIZ];" is going to stay with us,
> If it will ever be replaced, it will be a pervasive change throughout
> the CLISP sources, not just the regexp module.

The commonly used clearly correct alternative is to use buffers with
the (situation dependend) maximum size of the expected strings.
Though, as you pointed out, in case it's changed it should be changed
throughout the sources, and that's a lot of effort for a questionable gain.

------------------------------------------------------------------------------
_______________________________________________
clisp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clisp-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.