From: Daniel J. <dan...@gm...> - 2016-09-02 23:06:09
|
> 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. |