mika
11/04/2024, 9:16 AMArray.contains(_:)
come with documented complexity, which I find very useful. I really miss having something similar in Kotlin.
Here’s why I believe it would be valuable:
1. It enhances the development experience.
2. It promotes better, more efficient code.
3. It serves as a helpful form of documentation.
4. It centralizes the work, saving every developer from having to research complexities individually.
One possible approach could be to automate the calculation of time complexity empirically, using performance measurements across different n
values and object types (based on platform and common use cases).
Please let me know what you think—I’d be happy to assist with this.
Best regards,
MikaJoffrey
11/04/2024, 9:27 AMcontains
for a collection vastly depends on whether it's an ArrayList
, a HashSet
, a TreeSet
, etc.mika
11/04/2024, 9:38 AMJoffrey
11/04/2024, 9:52 AMJoffrey
11/04/2024, 9:59 AMmika
11/04/2024, 10:05 AMJoffrey
11/04/2024, 10:07 AMJoffrey
11/04/2024, 10:07 AM