On Wednesday, 20 June 2018 at 03:44:58 UTC, Jordan Wilson wrote:
Is there anything I can do to improve zip, before I go ahead
and change to the faster but slightly less readable enumerate?
The problem might be that zip checks both arrays for empty during
each step, enumerate only the first one
On Wednesday, 20 June 2018 at 04:40:42 UTC, Cym13 wrote:
On Wednesday, 20 June 2018 at 03:44:58 UTC, Jordan Wilson wrote:
[...]
This sounds like a very limited case: if you're not zipping
against a iota(foo) then there's no comparing with enumerate,
they simply don't do the same thing at all
On Wednesday, 20 June 2018 at 03:44:58 UTC, Jordan Wilson wrote:
Hello,
Idiomatically, I make use of zip, however, when looking to
speed up my program, notice that using enumerate leads to a
20-30% improvement:
void main(){
auto x = iota(1_000).array;
auto y = iota(1_000).array;
Hello,
Idiomatically, I make use of zip, however, when looking to speed
up my program, notice that using enumerate leads to a 20-30%
improvement:
void main(){
auto x = iota(1_000).array;
auto y = iota(1_000).array;
auto func1() {
return zip(x,y).map!(a => a[0]+a[1])
On 6/19/18 4:09 PM, gdelazzari wrote:
So, let's say I have this code
https://run.dlang.io/is/CaMJjd
It doesn't compile, and that makes sense since myNotSharedObject is...
not shared. So I can fix it by making the class shared and making a
shared instance of it, like this
https://run.dlang.i
So, let's say I have this code
https://run.dlang.io/is/CaMJjd
It doesn't compile, and that makes sense since myNotSharedObject
is... not shared. So I can fix it by making the class shared and
making a shared instance of it, like this
https://run.dlang.io/is/hoMFD1
And that's how shared is s
On Tuesday, 19 June 2018 at 12:26:15 UTC, Kagamin wrote:
On Friday, 15 June 2018 at 17:46:02 UTC, wjoe wrote:
D allows various levels of performance and safety. Though I'd
say Errors not working in debug mode is not intended, the
Intention matters not. By definition all program state is
inval
On Friday, 15 June 2018 at 17:46:02 UTC, wjoe wrote:
D allows various levels of performance and safety. Though I'd
say Errors not working in debug mode is not intended, the
Intention matters not. By definition all program state is
invalid at the point an Error was thrown. From there on it is
On 2018-06-11 20:00, DigitalDesigns wrote:
Changed some things in my app but unrelated to serialization and now my
app fails when trying to read the xml that was generated at the output
of the previous run.
Where it is failing is here:
void checkSpace(ref string s) @safe pure // rule 3
On 2018-06-12 02:13, DigitalDesigns wrote:
I also get a lot of inout's attached to key names. Seems excessive but
inout(inout(double)[])
Maybe they are necessary but seems like they are redundant.
I don't think they're technically necessary.
--
/Jacob Carlborg
On Saturday, 16 June 2018 at 05:05:19 UTC, DigitalDesigns wrote:
tupleof does not return static fields as does not Fields.
Currently the only method seems to be use allMembers, but that
returns members requiring filtering, which there is no good
filtering checks. I'd simply like to get all the
On 2018-06-13 02:31, DigitalDesigns wrote:
Also, is there any way to have a field as optional? Right now when I
update a filed in a serialized type the app crashes because it can't
find the field in the serialized data(since it was just added in the
code). This requires either regenerating the da
On 06/19/2018 11:50 AM, Sunny wrote:
I read about D here -
https://www.tutorialspoint.com/d_programming/index.htm
I'd advise against using that tutorial. Last time I looked at it, it
seemed to be of low quality [1]. And the better parts seemed to be
stolen from Ali Çehreli's "Programming in D
On Monday, 18 June 2018 at 20:23:48 UTC, Jonathan M Davis wrote:
On Monday, June 18, 2018 15:22:48 wjoe via Digitalmars-d-learn
wrote:
On Saturday, 16 June 2018 at 21:25:01 UTC, Jonathan M Davis
wrote:
> every feature that you can't use in betterC is considered a
> loss, and efforts are being m
On Tuesday, 19 June 2018 at 09:07:46 UTC, Cym13 wrote:
On Tuesday, 19 June 2018 at 05:52:00 UTC, Sunny wrote:
On Monday, 18 June 2018 at 13:23:37 UTC, Cym13 wrote:
Yes, this is what need, thank you very much for your help. :-)
[...]
I recommend that you take the D tour if you can, it explai
On Tuesday, 19 June 2018 at 05:52:00 UTC, Sunny wrote:
On Monday, 18 June 2018 at 13:23:37 UTC, Cym13 wrote:
Yes, this is what need, thank you very much for your help. :-)
[...]
I recommend that you take the D tour if you can, it explains all
those fundamental features quite well I think.
16 matches
Mail list logo