Skip to content

Commit

Permalink
Update Gender Speedup and Large Game Speedup for current Inform.
Browse files Browse the repository at this point in the history
  • Loading branch information
neroden committed Jan 7, 2024
1 parent 5ccd8f2 commit 9af2086
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 18 deletions.
12 changes: 8 additions & 4 deletions Nathanael Nerode/Gender Speedup-v4.i7x
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Version 4.0.230722 of Gender Speedup by Nathanael Nerode begins here.
Version 4.1.240107 of Gender Speedup by Nathanael Nerode begins here.

"When using Gender Options, clean up some I6 internals with functions related to gender which are irrelevant to English or rendered obsolete with Gender Options. Since these are called in the depths of ListWriter this should slightly improve speed. Not included in Gender Options due to likely interference with other extensions. Requires Gender Options. Will not work with languages with gendered plurals. Tested with Inform 10.1."

Expand Down Expand Up @@ -212,7 +212,7 @@ Include (-
}
if (prior_named_list == 2) break; ! This is all we need to know in English.
}
return;
return;
];
-) replacing "RegardingMarkedObjects"

Expand Down Expand Up @@ -276,7 +276,10 @@ Include (-
@push MarkedObjectArray; @push MarkedObjectLength;
MarkedObjectArray = RequisitionStack(length);
MarkedObjectLength = length;
if (MarkedObjectArray == 0) return RunTimeProblem(RTP_LISTWRITERMEMORY);
if (MarkedObjectArray == 0) {
return IssueRTP("ListWriterRanOutOfMemory",
"The list-writer has run out of memory.^", BasicInformKitRTPs);
}
if (common_parent) {
ObjectTreeCoalesce(child(common_parent));
Expand Down Expand Up @@ -330,7 +333,8 @@ Fluid Pronouns by Zed Lopez touches all of this code and is likely to conflict w
Section - Changelog:
4.0.230722: Update to new version of Inform.
4.0.240107: Update to new version of Inform.
4.0.230722: Update to new version of Inform.
3.0.220534: Section documentation. Format Changelog.
3.0.220523: Adaptation to Inform 10.1. Additional documentation on extension conflicts.
2/210331: Change disambiguation treatment with names of rooms. Should fix Counterfeit Monkey regtests
Expand Down
33 changes: 19 additions & 14 deletions Nathanael Nerode/Large Game Speedup-v7.i7x
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Version 7.1.240107 of Large Game Speedup by Nathanael Nerode begins here.
Version 7.1.240108 of Large Game Speedup by Nathanael Nerode begins here.

"Performance improvements for games with many objects, or with nested loops over objects, by avoiding looping over all objects."

Expand All @@ -9,7 +9,7 @@ Use authorial modesty.
[This broke in 6M62, but it's still very important. Updated by Nathanael Nerode.]
[It broke again in 10.1.0, and it's still just as important. Updated again.]
[Broke again with Inform 2023-07-22. Updated again.]
[Broke again with Inform 2024-01-07. Updated to use IssueRTP, but worth checking if it's used right.]
[Broke again with Inform 2024-01-07. Updated to use IssueRTP.]

Chapter - Empty

Expand Down Expand Up @@ -87,8 +87,12 @@ Include (-
for (i=1:i<=tab-->0:i++) {
j = tab-->i; ! Address of column table
if ((j-->1) & TB_COLUMN_DONTSORTME) {
return IssueRTP("RTP_TABLE_CANTSORT", "Attempt to sort a table whose ordering must remain fixed.", BasicInformKitRTPs);
}
IssueRTP("SortedTableWithFixedOrdering",
"Tried to sort a table whose ordering must remain fixed.", BasicInformKitRTPs);
print "*** Tried to sort a table whose ordering must remain fixed: table '",
(PrintTableName) tab, "'.^";
return;
}
}
if (col >= 100) col=TableFindCol(tab, col, false);
k = rows; ! Not the entire table
Expand Down Expand Up @@ -252,8 +256,8 @@ Include (-
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ WriteListFrom first in_style depth noactivity iter i a ol;
@push c_iterator; @push c_style; @push c_depth; @push c_margin;
if (iter) c_iterator = iter; else c_iterator = ObjectTreeIterator;
c_style = in_style; c_depth = depth;
if (iter) c_iterator = iter; else c_iterator = ObjectTreeIterator;
c_style = in_style; c_depth = depth;
c_margin = 0; if (in_style & EXTRAINDENT_BIT) c_margin = 1;
! Set or clear the list_filter_permits flag. Try to do it efficiently.
Expand Down Expand Up @@ -282,11 +286,11 @@ Include (-
}
}
first = c_iterator(first, depth, 0, START_ITF);
first = c_iterator(first, depth, 0, START_ITF);
if (first == nothing) {
if (in_style & ISARE_BIT ~= 0) LW_Response('W'); else LW_Response('Y');
if (in_style & NEWLINE_BIT ~= 0) new_line;
} else {
if (in_style & NEWLINE_BIT ~= 0) new_line;
} else {
if ((noactivity) || (iter)) {
WriteListR(first, c_depth, true);
say__p = 1;
Expand All @@ -300,7 +304,7 @@ Include (-
}
}
@pull c_margin; @pull c_depth; @pull c_style; @pull c_iterator;
@pull c_margin; @pull c_depth; @pull c_style; @pull c_iterator;
];
-) replacing "WriteListFrom".

Expand Down Expand Up @@ -329,8 +333,8 @@ Include (-
MarkedObjectArray = RequisitionStack(length);
MarkedObjectLength = length;
if (MarkedObjectArray == 0) {
return IssueRTP("RTP_LISTWRITERMEMORY", "The list-writer has run out of memory.", BasicInformKitRTPs);
}
return IssueRTP("ListWriterRanOutOfMemory", "The list-writer has run out of memory.^", BasicInformKitRTPs);
}
! common_parent is always set
ObjectTreeCoalesce(child(common_parent));
Expand Down Expand Up @@ -538,8 +542,9 @@ Do *not* use the standard "group X together" phrases when static option grouping
Chapter - Changelog
7.1.240107 updated to new version of Inform (RunTimeError->IssueRTP)
7.0.230723 updated to new version of Inform.
7.1.240108 fixed formatting.
7.1.240107 updated to new version of Inform (RunTimeError->IssueRTP)
7.0.230723 updated to new version of Inform.
6.0.20220524 reformatted the Changelog.
6.0.20220521 adapted to Inform v10.
5/210908 added some missing rule response labels to the optimized you-can-also-see rule, and changed a "here" to "[here]" -- ZL
Expand Down

0 comments on commit 9af2086

Please sign in to comment.