Re: port C++ to D - copy constness

2014-06-02 Thread dennis luehring via Digitalmars-d-learn
Am 02.06.2014 12:09, schrieb Timon Gehr: On 06/02/2014 09:06 AM, dennis luehring wrote: i want to port this C++ code to good/clean D and have no real idea how to start contains 2 templates - a slice like and a binary reader for an slice main idea was to copy the immutablity of the slice data to

port C++ to D - copy constness

2014-06-02 Thread dennis luehring via Digitalmars-d-learn
i want to port this C++ code to good/clean D and have no real idea how to start contains 2 templates - a slice like and a binary reader for an slice main idea was to copy the immutablity of the slice data to the reader http://pastebin.com/XX2yhm8D the example compiles fine with http://gcc.godb

Re: Cost of assoc array?

2014-05-14 Thread dennis luehring via Digitalmars-d-learn
Am 14.05.2014 15:20, schrieb Chris: Profiling is not really feasible, because for this to work properly, I would have to introduce the change first to be able to compare both. Nothing worse than carefully changing things only to find out, it doesn't really speed up things. why not using an alia

Re: Cost of assoc array?

2014-05-14 Thread dennis luehring via Digitalmars-d-learn
Am 14.05.2014 12:33, schrieb Chris: On Wednesday, 14 May 2014 at 10:20:51 UTC, bearophile wrote: Chris: Is there any huge difference as regards performance and memory footprint between the two? Or is 2. basically 1. under the hood? An associative array is a rather more complex data structure