Skip to content

onlyworlds 0.148.2

Choose a tag to compare

@github-actions github-actions released this 24 Nov 11:31
· 62 commits to main since this release
  • Fixed: a stored calendar no longer sets what one date label costs. format_step collapsed the separators around an empty token with a regular expression that took cubic time on a long run of white space (a template with 1,000 spaces: about half a second for one label; 4,000 spaces: about a minute), and trimmed a label's edges with one that took quadratic time on a long run of commas; both are one pass now. A year was built as a list of every day on each call, so a month of 5,000,000 days cost seconds a label in format_step, weekday_for_step, breakdown_step and parse_date; a month is one run now, and each answer is arithmetic. Every answer is the same as before: the profile's fixture, the old and new builds compared on 7,071 steps of the fixture's calendars and of made ones (formats, weekdays, breakdowns and parses), and eight timed cases in tests/fixtures/calendar-cost.cases.json, the same bytes as the npm SDK's, each inside its bound. Not changed: a calendar with 1,500 eras still costs about 20 milliseconds a label, and one with 800 leap rules about a tenth of a second.