This repository has been archived by the owner on Jun 1, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 17
fix NODEFAULT_SHAREKEYS #201
Labels
Comments
upstream bug bisected with ../bisect-miniperl.sh
to
|
benchmarks: simple bench.pl without many hashes: on linux 27% faster with NODEFAULT_SHAREKEYS. |
rurban
pushed a commit
that referenced
this issue
Sep 29, 2016
Dont store all hash keys in strtab also. WIP: sv_clear of a IsCOW/LEN=0 PV fails to get the he before the hek, which is shared with the pv. Fixed with subsequent commits. See GH #201
rurban
pushed a commit
that referenced
this issue
Sep 29, 2016
The WASUTF8 logic turned off UNSHARED and STATIC also, whilst it should only reset UTF8 and WASUTF8. Closes GH #201
Merged with c2ef6c7 |
Open
Simple scripts without much hash copying or looping are 20-30% faster, but other scripts are a few percent slower. So we keep NODEFAULT_SHAREKEYS undefined. In detail: ../bench.pl is faster, perlbench-run is slower with -DNODEFAULT_SHAREKEYS |
rurban
pushed a commit
that referenced
this issue
Oct 12, 2016
Dont store all hash keys in strtab also. WIP: sv_clear of a IsCOW/LEN=0 PV fails to get the he before the hek, which is shared with the pv. Fixed with subsequent commits. See GH #201
rurban
pushed a commit
that referenced
this issue
Oct 12, 2016
The WASUTF8 logic turned off UNSHARED and STATIC also, whilst it should only reset UTF8 and WASUTF8. Closes GH #201
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When NODEFAULT_SHAREKEYS is defined, sv_clear of a IsCOW/LEN=0 PV fails to get the he before the hek, which is shared with the pv.
With default SHAREKEYS every single key is stored twice. Once in strtab, and once in the hash. This seems to be a massive overhead. But I cannot test the overhead with this failure. (=> 20-30% faster)
This is an upstream bug, typical bitrot. perl5 simply assumes that every single non-strtab hash uses shared keys, ignoring the HVhek_UNSHARED bit somewhere. Or most likely forgetting to copy this bit.
NODEFAULT_SHAREKEYS was previously in newHV() in hv.c, added with fde52b5 in perl 5.003_01
repro: Configure with
-DDEBUGGING -Accflags=-DNODEFAULT_SHAREKEYS
;make miniperl; ./miniperl -Ilib configpm && make uni.data
and see the unshare_hek assert.This even happens with 5.10.0, before new IsCOW times, but works with 5.8.9. So it got broken during the 5.9 cycle, probably with the old COW.
The text was updated successfully, but these errors were encountered: