Add a shorter way to find the indexes of min and max elements of a list.#98
Add a shorter way to find the indexes of min and max elements of a list.#98askanium wants to merge 1 commit intobrennerm:masterfrom
Conversation
|
I don't see the benefit of this. benchmark : And for fair results, one should before trying again |
|
I will respectfully disagree. First, it seems the timing is not consistent and for your solution you used Second, on smaller arrays, using Third, in the repo readme, you have this bit in the Intention block: "Creating a knowledge base of unpopular Python built-in features to save a lot of unnecessary code."
However, only performance is discussed here. If this is the most important factor, it would be great to have the README reflect it then. |
|
By default, the number of loops of Of course, You stated the correct way to do so, I wasn't criticizing the PR, but the proposed trick by @huwenchao |
|
@flintforge, one usually doesn't comment regarding existing merged code, stating it shouldn't be used and not saying a word about the code in PR. Your comment above was clearly stated regarding my solution: "I don't see the benefit of this. Looks like an "anti-trick" to me, that shouldn't be used." |
No description provided.