Re: Fastest Way of Accessing Entries in an AA

2015-01-09 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, January 09, 2015 07:51:27 Foo via Digitalmars-d-learn wrote: > On Friday, 9 January 2015 at 06:18:53 UTC, Jonathan M Davis via > Digitalmars-d-learn wrote: > > On Friday, January 09, 2015 00:20:07 Foo via > > Digitalmars-d-learn wrote: > >> You know, that you kan reuse the result of the

Re: Fastest Way of Accessing Entries in an AA

2015-01-08 Thread Foo via Digitalmars-d-learn
On Friday, 9 January 2015 at 06:18:53 UTC, Jonathan M Davis via Digitalmars-d-learn wrote: On Friday, January 09, 2015 00:20:07 Foo via Digitalmars-d-learn wrote: On Thursday, 8 January 2015 at 23:06:39 UTC, Nordlöw wrote: > On Thursday, 8 January 2015 at 16:11:07 UTC, ketmar via > Digitalmars-d

Re: Fastest Way of Accessing Entries in an AA

2015-01-08 Thread ketmar via Digitalmars-d-learn
On Thu, 08 Jan 2015 23:06:38 + "Nordlöw" via Digitalmars-d-learn wrote: > On Thursday, 8 January 2015 at 16:11:07 UTC, ketmar via > Digitalmars-d-learn wrote: > > how can it? compiler doesn't know what the code is supposed to > > do. if > > compilers will know such things someday, we can st

Re: Fastest Way of Accessing Entries in an AA

2015-01-08 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, January 09, 2015 00:20:07 Foo via Digitalmars-d-learn wrote: > On Thursday, 8 January 2015 at 23:06:39 UTC, Nordlöw wrote: > > On Thursday, 8 January 2015 at 16:11:07 UTC, ketmar via > > Digitalmars-d-learn wrote: > >> how can it? compiler doesn't know what the code is supposed to > >> d

Re: Fastest Way of Accessing Entries in an AA

2015-01-08 Thread Foo via Digitalmars-d-learn
On Thursday, 8 January 2015 at 23:06:39 UTC, Nordlöw wrote: On Thursday, 8 January 2015 at 16:11:07 UTC, ketmar via Digitalmars-d-learn wrote: how can it? compiler doesn't know what the code is supposed to do. if compilers will know such things someday, we can stop writing programs altogether,

Re: Fastest Way of Accessing Entries in an AA

2015-01-08 Thread Nordlöw
On Thursday, 8 January 2015 at 16:11:07 UTC, ketmar via Digitalmars-d-learn wrote: how can it? compiler doesn't know what the code is supposed to do. if compilers will know such things someday, we can stop writing programs altogether, as compilers will be able to write any program for us. ;-)

Re: Fastest Way of Accessing Entries in an AA

2015-01-08 Thread ketmar via Digitalmars-d-learn
On Thu, 08 Jan 2015 15:59:10 + "Nordlöw" via Digitalmars-d-learn wrote: > On Thursday, 8 January 2015 at 15:49:46 UTC, Dragos Carp wrote: > > On Thursday, 8 January 2015 at 15:45:27 UTC, Nordlöw wrote: > >> Is > >> > >>key in aa ? aa[key] : ValueType.init; > >> > >> the most efficient way

Re: Fastest Way of Accessing Entries in an AA

2015-01-08 Thread Nordlöw
On Thursday, 8 January 2015 at 15:49:46 UTC, Dragos Carp wrote: On Thursday, 8 January 2015 at 15:45:27 UTC, Nordlöw wrote: Is key in aa ? aa[key] : ValueType.init; the most efficient way to maybe return a value from an associative array aa? aa.get(key, ValueType.init) That was too eas

Re: Fastest Way of Accessing Entries in an AA

2015-01-08 Thread Dragos Carp via Digitalmars-d-learn
On Thursday, 8 January 2015 at 15:45:27 UTC, Nordlöw wrote: Is key in aa ? aa[key] : ValueType.init; the most efficient way to maybe return a value from an associative array aa? aa.get(key, ValueType.init)

Fastest Way of Accessing Entries in an AA

2015-01-08 Thread Nordlöw
Is key in aa ? aa[key] : ValueType.init; the most efficient way to maybe return a value from an associative array aa?