Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We have two separate length thresholds for when copy-on-write kicks in, one for when a buffer would have had to be (re)allocated (SV_COW_THRESHOLD) and another for when there is already a large enough buffer available (SV_COWBUF_THRESHOLD). Benchmarking against mktables and against Test.Simple’s test suite (see JS::Test::Simple on CPAN) run with WWW::Scripter and JE shows that 0/1250 is the best combination, at least on 32-bit darwin. Apparently, copying into an existing buffer is much faster than the bookkeeping overhead of sv_force_normal_flags (which I see no way to speed up). I have defined these conditionally with #ifndef, so that platform-spe- cific hints can override them with values appropriate to the platform. Also, refactor things in sv_setsv_flags slightly to avoid using SvLEN and SvCUR repeatedly.
- Loading branch information
Father Chrysostomos
committed
Nov 27, 2012
1 parent
db2c6cb
commit 9fd2152
Showing
2 changed files
with
30 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters