Hello, maybe the code above / inside getstring already knows that string length, and you could exploit that fact to avoid the strlen calculation...
On Fri, Sep 26, 2014 at 6:51 PM, Armin Rigo <ar...@tunes.org> wrote: > Hi, > > On 25 September 2014 16:57, Eleytherios Stamatogiannakis > <est...@gmail.com> wrote: > > Wouldn't an "strbuffer" that does this scan (opportunistically) be faster > > for cases like above? > > No, it can't be faster than my last solution. There is no way we're > going to add custom logic for a special case into the general ffi > library. If you don't want to use ffi.verify(), then you're stuck > with two calls instead of one. On PyPy, try the latest version > (2.4.0); it reduces the overhead of each call, so the cost of doing > two calls instead of one is much lower. > > > A bientôt, > > Armin. > _______________________________________________ > pypy-dev mailing list > pypy-dev@python.org > https://mail.python.org/mailman/listinfo/pypy-dev > -- Vincent Legoll
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev