policyengine-us icon indicating copy to clipboard operation
policyengine-us copied to clipboard

Replace comprehensive `select` statement by `filing_status` with `default` of `SINGLE`

Open MaxGhenis opened this issue 2 years ago • 1 comments

SOI shows that in 2020 (latest year available), single was the most common filing status:

Filing status Count (million)
Single 84
Joint+widow 55
Head of household 21
Separate 4

As select statements are more performant when using default (#1176), especially with the most common case, let's use SINGLE as the default filing status.

MaxGhenis avatar Nov 30 '23 20:11 MaxGhenis

This time test shows that the most performant approach is to order the select from least to (2nd) most common, then make the most common value the default. Accordingly, I'd suggest we change the selects into:

[SURVIVING_SPOUSE, SEPARATE, HEAD_OF_HOUSEHOLD, JOINT], default=SINGLE

MaxGhenis avatar Apr 23 '24 08:04 MaxGhenis