Suggestion: Operator `in` for slices

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Sun Dec 19 07:50:33 UTC 2021


On Saturday, 18 December 2021 at 20:46:06 UTC, Dennis wrote:
> - Despite scaling with O(n), a linear scan is pretty fast. You 
> can probably scan your entire RAM in a matter of seconds.

Also, if the array is sorted it would be O(log N). You can 
achieve this either by adding a high level IR that can deduce 
that the array is sorted or making it part of the type system.


More information about the Digitalmars-d mailing list