Improve Year.isLeap by checking divisibility by 16

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 22
    • Affects Version/s: None
    • Component/s: core-libs
    • None
    • b24

      The code for checking if a proleptic year is a leap year can be improved by using a quicker test for divisibility by 16 rather than % 400.

      The suggested improvement was inspired by the talk "Implementing Fast Calendar Algorithms" by Cassio Neri: https://www.youtube.com/watch?v=0s9F4QWAl-E

            Assignee:
            Claes Redestad
            Reporter:
            Claes Redestad
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: