fin_year is slow when dealing with moderate/large data sets. For example, it takes ~40 seconds to process 10 million dates (which is about the same number of rows as 10 years of SMR01).
It can be sped up substantially by only converting the unique dates in the set, then matching back to the original set. Testing this, I get it at ~1 second for the same 10 million rows.
fin_year
is slow when dealing with moderate/large data sets. For example, it takes ~40 seconds to process 10 million dates (which is about the same number of rows as 10 years of SMR01).It can be sped up substantially by only converting the unique dates in the set, then matching back to the original set. Testing this, I get it at ~1 second for the same 10 million rows.