ecrypa
ecrypa
How should the interfaces exactly look like? As a starting point, I implemented [one possible version of `min_element`](https://github.com/ecrypa/metal/commit/11289ce3d1a3fad72c5de78c14fce40c1c61b65f). It is based on `fold_left` and `find`. I am not sure if...
> I'm super excited that you're looking into this! Please do not expect any long-term commitment. To be honest, I am just here in order to improve my skills. Metal...
I just realized that my previous comment was premature. Let me shortly answer my own question: > Given a huge list of types, how to obtain the 20 smallest types?...
> > Should there be a default ordering for `metal::numbers`? > > What do you mean? For `std::min_element`, you can omit the comparison function. The default is `operator; ```
Initially, I had a list return in mind, and you had a single-value return in mind. Did you notice that we just swapped our opinions? That is funny. > The...
[First benchmarks](https://ecrypa.github.io/metal-benchmark/) of [my attempt on `nth_element`](https://github.com/ecrypa/metal/commit/e4143038cf03f5593cf597aa1cde63de61f49f6b) suggest the following preliminary conclusions: 1. With GCC 9, my implementation is _extremely_ inefficient. 2. "List return" and "value return" are equally fast...
One more argument for list return: It might be useful to define ``` IS_SAME( list_of_numbers,// input is returned as it is metal::nth_element< list_of_numbers, metal::size,// NOTE: "end iterator" metal::lambda>); ``` such...
> I made a few comments that may have considerable impact on performance. Thanks. Those comments include exactly those advices I am looking for. > [...] but bear in mind...
What about the interfaces of `metal::min_element` and `metal::max_element` then? I have two questions: 1. Should `metal::max_element` return the first or last occurence of equally ordered elements in the case of...
> 1. Hard to argue against Stepanov. Indeed. My question is: Should `metal::max_element` break the analogy to `std::max_element` just for being correct? Which convention is more useful? > 2. I'd...