Skip to content

Commit e401db5

Browse files
committed
Re-enable re-use of strings on the string heap; it makes a fairly notable difference to the output size of CORE.setting compilation, and a small but certainly worthwhile difference to CORE.setting compilation time. Causes no issues here; hopefully not for anyone else now either.
1 parent 6589656 commit e401db5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/6model/serialization.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,13 @@ static Parrot_Int4 add_string_to_heap(PARROT_INTERP, SerializationWriter *writer
120120
* so can just hand back 0 here. */
121121
return 0;
122122
}
123-
/*else if (VTABLE_exists_keyed_str(interp, writer->seen_strings, s)) {
123+
else if (VTABLE_exists_keyed_str(interp, writer->seen_strings, s)) {
124124
return (Parrot_Int4)VTABLE_get_integer_keyed_str(interp, writer->seen_strings, s);
125125
}
126-
else*/ {
126+
else {
127127
INTVAL next_idx = VTABLE_elements(interp, writer->root.string_heap);
128128
VTABLE_set_string_keyed_int(interp, writer->root.string_heap, next_idx, s);
129-
/*VTABLE_set_integer_keyed_str(interp, writer->seen_strings, s, next_idx);*/
129+
VTABLE_set_integer_keyed_str(interp, writer->seen_strings, s, next_idx);
130130
return (Parrot_Int4)next_idx;
131131
}
132132
}

0 commit comments

Comments
 (0)