Re: D1: std.md5: corrections for the given example

2009-09-19 Thread grauzone
notna wrote: grauzone schrieb: md5_example_2.d(7): expression expected, not 'auto' md5_example_2.d(7): found 'len' when expecting ')' md5_example_2.d(7): found '=' instead of statement (this is line 7 after I removed comments and blank lines from your edit) Stewart. God I'm stupid.

Re: better than union and array questions

2009-09-19 Thread bearophile
Saaa: Is there a better way to support arrays of any type? Currently all the code working with these Structs are templated with loads of static ifs in them. You have to ask a more precise question if you want an answer. Also, is it possible to add a .deepdup property to all arrays? D

Re: Array assign

2009-09-19 Thread bearophile
I have done more experiments, it seems movntps instruction gives a performance gain only when the array is longer than about 200_000 ints (celeron CPU). For [25, 200_000] integers the movaps is better (and better than C memset). For n 25 the best thing I've found is just an inlined loop. I'll

Re: better than union and array questions

2009-09-19 Thread Saaa
bearophile Wrote: Saaa: Is there a better way to support arrays of any type? Currently all the code working with these Structs are templated with loads of static ifs in them. You have to ask a more precise question if you want an answer. Maybe a more general one :) I use a tagged