- `static let ` that cached values were replaced with `static var`.
- Some singletons were replaced with DI.
`static let` is very slow due to synchronization.
Every `static let` was removed, except for case with caching regular expression (it is faster to cache it in `static let`) and singletons (it is neccessary there)
Even `static let`'s for simple values like `Int` were removed. Compiler optimizes them to behave as with `static var`, however, for me it is better to not think about compiler optimizations, also, if there are only few `static let`, it is easier to track bad code like singletons or `static let` that lead to synchronization even with compiler optimizations.
Assets
2
-
2023-07-05T14:41:09Z
-
2023-07-05T14:41:09Z
-