On Saturday, 5 March 2016 at 13:15:46 UTC, Andrei Alexandrescu
wrote:
On 03/04/2016 11:34 PM, Jonathan M Davis wrote:
This makes me wonder if something like iota would benefit from
a similar
optimization.
Certainly. -- Andrei
I haven't done much with CTFE yet, but how would one get the type
On Friday, 4 March 2016 at 20:14:41 UTC, Andrei Alexandrescu
wrote:
This is just speculation. When the stride is passed to larger
functions the value of the stride is long lost.
I understand the desire for nice and simple code but sadly the
stdlib is not a good place for it - everything must b
On 03/04/2016 11:34 PM, Jonathan M Davis wrote:
This makes me wonder if something like iota would benefit from a similar
optimization.
Certainly. -- Andrei
On 03/04/2016 09:50 PM, John Colvin wrote:
On Friday, 4 March 2016 at 23:33:40 UTC, Andrei Alexandrescu wrote:
On 03/04/2016 04:19 PM, H. S. Teoh via Digitalmars-d wrote:
Why not rather improve dmd optimization, so that such manual
optimizations are no longer necessary?
As I mentioned, optimi
On Friday, 4 March 2016 at 16:45:42 UTC, Andrei Alexandrescu
wrote:
Currently we have a very useful stride() function that allows
spanning a random access range with a specified step, e.g. 0,
3, 6, 9, ... for step 3.
I've run some measurements recently and it turns out a
compile-time-known st
On Friday, 4 March 2016 at 23:33:40 UTC, Andrei Alexandrescu
wrote:
On 03/04/2016 04:19 PM, H. S. Teoh via Digitalmars-d wrote:
Why not rather improve dmd optimization, so that such manual
optimizations are no longer necessary?
As I mentioned, optimizing the use of stride in large
(non-inline
On 03/04/2016 04:19 PM, Meta wrote:
On Friday, 4 March 2016 at 20:14:41 UTC, Andrei Alexandrescu wrote:
This is just speculation. When the stride is passed to larger
functions the value of the stride is long lost.
I understand the desire for nice and simple code but sadly the stdlib
is not a go
On 03/04/2016 04:19 PM, H. S. Teoh via Digitalmars-d wrote:
Why not rather improve dmd optimization, so that such manual
optimizations are no longer necessary?
As I mentioned, optimizing the use of stride in large (non-inlined)
functions is a tall order. -- Andrei
On 03/04/2016 04:32 PM, Jonathan M Davis wrote:
IMHO, it would be cleaner to make them separate templates so that we
don't have to give some special meaning to step == 0. And if it made
sense for them to share their implementation, we could still have a
helper template that did the step == 0 so t
On Friday, 4 March 2016 at 16:45:42 UTC, Andrei Alexandrescu
wrote:
Currently we have a very useful stride() function that allows
spanning a random access range with a specified step, e.g. 0,
3, 6, 9, ... for step 3.
I've run some measurements recently and it turns out a
compile-time-known st
On Fri, Mar 04, 2016 at 08:14:41PM +, Andrei Alexandrescu via Digitalmars-d
wrote:
> kinke wrote:
> > On Friday, 4 March 2016 at 17:49:09 UTC, John Colvin wrote:
> >> Surely after inlining (I mean real inlining, not dmd) it makes no
> >> difference, a constant is a constant?
> >>
> >> I reme
On Friday, 4 March 2016 at 20:14:41 UTC, Andrei Alexandrescu
wrote:
This is just speculation. When the stride is passed to larger
functions the value of the stride is long lost.
I understand the desire for nice and simple code but sadly the
stdlib is not a good place for it - everything must b
kinke wrote:
> On Friday, 4 March 2016 at 17:49:09 UTC, John Colvin wrote:
>> Surely after inlining (I mean real inlining, not dmd) it makes
>> no difference, a constant is a constant?
>>
>> I remember doing tests of things like that and finding that not
>> only did it not make a difference to
On Friday, 4 March 2016 at 18:40:58 UTC, kinke wrote:
Then let's not complicate Phobos please. I'm really no friend
of special semantics for `step == 0` and stuff like that. Let's
keep code as readable and simple as possible, especially in the
standard libraries, and let the compilers do thei
On Friday, 4 March 2016 at 17:49:09 UTC, John Colvin wrote:
Surely after inlining (I mean real inlining, not dmd) it makes
no difference, a constant is a constant?
I remember doing tests of things like that and finding that not
only did it not make a difference to performance, ldc produced
ne
On Friday, 4 March 2016 at 16:45:42 UTC, Andrei Alexandrescu
wrote:
Currently we have a very useful stride() function that allows
spanning a random access range with a specified step, e.g. 0,
3, 6, 9, ... for step 3.
I've run some measurements recently and it turns out a
compile-time-known st
On Friday, 4 March 2016 at 16:45:42 UTC, Andrei Alexandrescu
wrote:
Currently we have a very useful stride() function that allows
spanning a random access range with a specified step, e.g. 0,
3, 6, 9, ... for step 3.
I've run some measurements recently and it turns out a
compile-time-known st
Currently we have a very useful stride() function that allows spanning a
random access range with a specified step, e.g. 0, 3, 6, 9, ... for step 3.
I've run some measurements recently and it turns out a
compile-time-known stride is a lot faster than a variable. So I was
thinking to improve St
18 matches
Mail list logo