-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
findlast(_, ::Tuple[1..33+])
is not well
#45117
Comments
findlast(==(x), ::Tuple[1..33+])
overallocatesfindlast(_, ::Tuple[1..33+])
is not well
Could you be a bit more descriptive? What does " is not well" mean? It is usually a good idea in an issue to add a bit of descriptive text. |
right. The sense of it is that there are four cases and all are good given tuples with up to about 30 simple items. Three continue to behave nicely with larger tuples. One does not. I was testing Further, I expected to see findfirst and findlast to be almost the same when given the same thing to find over. At the start, I tested findfirst to find the sixth item from the first (in the tuple and in the vector) and I tested findlast with sixth item from the last. This was just to ensure my benchmarking setup had no hidden issues. And I ran the four cases (findfirst in tuple, findfirst in vector, findlast in tuple, findlast in vector) on sequences of different lengths, all the while seeking the sixth from the first or from the last. findfirst in tuple, findfirst in vector, and findlast in vector ran well and quite quickly found the targets throughout the range of lengths (24..40). I intended to take the lengths out more. but. findlast seeking in a tuple with the same content and target as findlast seeking in a vector and relatively the same conditions as findfirst seeking in a tuple and in a vector (targeting the sixth from the end in the direction scanned) reported huge increases in allocations and time as the lengths got beyond 30..31. findlast over a tuple of lengths 30, 31, 32 showed 30: 4.200 ns (0 allocations: 0 bytes) and it keeps growing apace thereafter |
these three are good
these lengths are informative
The text was updated successfully, but these errors were encountered: