roarin-roran / Sorting

0 stars 0 forks source link

move testing for single run merges outside of the ipq #48

Closed roarin-roran closed 2 years ago

roarin-roran commented 2 years ago

currently, single run merges are handled inside the ipq, which reads them all in, executes a bunch of operations to read them out again, and asks regular merges an extra question in the ipq to safeguard against them.

replace all this wasted work with a question before an ipq is created - if there's only one run, it's already merged.

roarin-roran commented 2 years ago

I wish we had a propper run timing package here:

maybe it was just the short inputs, but this reduced the total time cost by over 10%.

note: this is handled by the sorter, not the merger. this skips an extra layer of object creation (no point in creating either a merger or a merger ipq for a single run). future sorters must also handle this issue, or will get weird error messages. added a todo to testing file - that's really too small for an issue, and the todo will help a lot in bug hunting anyway.

roarin-roran commented 2 years ago

edit: have made a test for this