Commit 03c33d2
Avoid 2^N
Process keys incrementally instead of generating all power-set variants
upfront via `getAllArrays()`. For each key, fork partial
`ConstantArrayTypeBuilder` instances for optional keys and finite value
variants, bailing early when the count exceeds `CALCULATE_SCALARS_LIMIT`.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>getAllArrays() expansion in ConstantArrayType::getFiniteTypes()
1 parent df03be2 commit 03c33d2
File tree
2 files changed
+54
-27
lines changed- src/Type/Constant
- tests/bench/data
2 files changed
+54
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
1997 | 1996 | | |
1998 | 1997 | | |
1999 | 1998 | | |
2000 | | - | |
2001 | | - | |
2002 | | - | |
2003 | | - | |
2004 | | - | |
2005 | | - | |
2006 | | - | |
2007 | | - | |
2008 | | - | |
2009 | | - | |
| 1999 | + | |
| 2000 | + | |
| 2001 | + | |
| 2002 | + | |
| 2003 | + | |
| 2004 | + | |
| 2005 | + | |
| 2006 | + | |
| 2007 | + | |
| 2008 | + | |
| 2009 | + | |
| 2010 | + | |
| 2011 | + | |
| 2012 | + | |
| 2013 | + | |
| 2014 | + | |
| 2015 | + | |
| 2016 | + | |
| 2017 | + | |
| 2018 | + | |
| 2019 | + | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
| 2023 | + | |
2010 | 2024 | | |
2011 | | - | |
2012 | | - | |
2013 | 2025 | | |
2014 | | - | |
2015 | | - | |
2016 | | - | |
2017 | 2026 | | |
2018 | | - | |
2019 | | - | |
| 2027 | + | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
2020 | 2031 | | |
2021 | 2032 | | |
2022 | 2033 | | |
2023 | | - | |
2024 | | - | |
2025 | | - | |
2026 | | - | |
2027 | | - | |
2028 | | - | |
2029 | | - | |
2030 | | - | |
2031 | | - | |
| 2034 | + | |
| 2035 | + | |
2032 | 2036 | | |
2033 | 2037 | | |
2034 | 2038 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
0 commit comments