Re: I need some help benchmarking SoA vs AoS

2016-03-26 Thread Marco Leise via Digitalmars-d-learn
Am Sat, 26 Mar 2016 17:43:48 + schrieb maik klein : > On Saturday, 26 March 2016 at 17:06:39 UTC, ag0aep6g wrote: > > On 26.03.2016 18:04, ag0aep6g wrote: > >> https://gist.github.com/aG0aep6G/a1b87df1ac5930870ffe/revisions > > > > PS: Those enforces are for a size

Re: rawWrite of a struct suggestions

2016-03-26 Thread Charles Hixson via Digitalmars-d-learn
OK, after removing a few bugs, preliminary checks say that this works perfectly. Thanks again, as I never would have even considered that approach. On 03/25/2016 12:24 PM, Charles Hixson via Digitalmars-d-learn wrote: On 03/25/2016 11:32 AM, Adam D. Ruppe via Digitalmars-d-learn wrote: On

Re: I need some help benchmarking SoA vs AoS

2016-03-26 Thread maik klein via Digitalmars-d-learn
On Saturday, 26 March 2016 at 17:06:39 UTC, ag0aep6g wrote: On 26.03.2016 18:04, ag0aep6g wrote: https://gist.github.com/aG0aep6G/a1b87df1ac5930870ffe/revisions PS: Those enforces are for a size of 100_000 not 1_000_000, because I'm impatient. Thanks, okay that gives me more more reliable

Re: byChunk odd behavior?

2016-03-26 Thread Hanh via Digitalmars-d-learn
On Saturday, 26 March 2016 at 08:34:04 UTC, cym13 wrote: Sorry, it seems I completely misunderstood you goal. I thought that take() consumed its input (which mostly only shows that I really am careful about not reusing ranges). Writting a take that consume shouldn't be difficult though:

Re: I need some help benchmarking SoA vs AoS

2016-03-26 Thread ag0aep6g via Digitalmars-d-learn
On 26.03.2016 18:04, ag0aep6g wrote: https://gist.github.com/aG0aep6G/a1b87df1ac5930870ffe/revisions PS: Those enforces are for a size of 100_000 not 1_000_000, because I'm impatient.

Re: I need some help benchmarking SoA vs AoS

2016-03-26 Thread ag0aep6g via Digitalmars-d-learn
On 26.03.2016 17:31, ag0aep6g wrote: Let the output depend on the results somehow. Simply printing them out should do the trick. You can also try throwing an Exception on wrong results. Else the calculations will be optimized away completely. Also make sure that data that's supposed to be

Re: Strange behavior in console with UTF-8

2016-03-26 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/25/16 6:47 PM, Jonathan Villa wrote: On Friday, 25 March 2016 at 13:58:44 UTC, Steven Schveighoffer wrote: On 3/24/16 8:54 PM, Jonathan Villa wrote: [...] D's File i/o uses C's FILE * i/o system. At least on Windows, this has literally zero support for wchar (you can set stream width,

Re: I need some help benchmarking SoA vs AoS

2016-03-26 Thread ag0aep6g via Digitalmars-d-learn
On 26.03.2016 14:47, maik klein wrote: The problem I have is that LDC always seems to optimize the functions too much. At least one function executes always in "1 hnsec". Let the output depend on the results somehow. Simply printing them out should do the trick. You can also try throwing an

Re: Updating D-based apps without recompiling it

2016-03-26 Thread Ozan via Digitalmars-d-learn
On Thursday, 24 March 2016 at 23:03:54 UTC, cym13 wrote: On Thursday, 24 March 2016 at 18:46:43 UTC, Jesse Phillips wrote: On Wednesday, 23 March 2016 at 17:29:50 UTC, Jacob Carlborg wrote: On 2016-03-23 18:15, Jesse Phillips wrote: Do you have an example of this being done in any other

Re: Updating D-based apps without recompiling it

2016-03-26 Thread Ozan via Digitalmars-d-learn
On Wednesday, 23 March 2016 at 17:15:35 UTC, Jesse Phillips wrote: On Wednesday, 23 March 2016 at 12:21:33 UTC, Ozan wrote: Hi Enterprise applications in productive environments requires smooth updating mechanisms without recompiling or reinstalling. It's not possible to stop an enterprise

I need some help benchmarking SoA vs AoS

2016-03-26 Thread maik klein via Digitalmars-d-learn
I recently wrote an article an SoA https://maikklein.github.io/post/soa-d/ But now I wanted to actually benchmark SoA vs AoS and it is so much harder than I thought. In DMD SoA basically always beats AoS by a huge chuck. SoA is always at least twice as fast compared to AoS. But with LDC

Re: Template recursion error on table struct

2016-03-26 Thread data pulverizer via Digitalmars-d-learn
On Saturday, 26 March 2016 at 09:47:10 UTC, Ali Çehreli wrote: Please ignore my earlier response. :) On 03/25/2016 02:54 PM, data pulverizer wrote: > template ColumnTable(T...){ [...] > auto output = ColumnTable!(new_data)(new_data); // This is the > problem You want to slice the

Re: Template recursion error on table struct

2016-03-26 Thread Ali Çehreli via Digitalmars-d-learn
Please ignore my earlier response. :) On 03/25/2016 02:54 PM, data pulverizer wrote: > template ColumnTable(T...){ [...] > auto output = ColumnTable!(new_data)(new_data); // This is the > problem You want to slice the template arguments there. The following removes the infinite

Re: Checking if a port is listening

2016-03-26 Thread Lucien via Digitalmars-d-learn
On Wednesday, 16 March 2016 at 20:44:12 UTC, Lucien wrote: Hello, I want to know if a port of an ip address is listening, actually, I've this : http://pastebin.com/pZhm0ujy (checking port 22/ssh) It works, but it took me ~10min to scan 30 addresses. How can reduce the expiration delay ?

Re: Template recursion error on table struct

2016-03-26 Thread data pulverizer via Digitalmars-d-learn
On Saturday, 26 March 2016 at 06:28:42 UTC, Ali Çehreli wrote: Likewise, that instantiation of ColumnTable is with the symbols 'names', 'salary', and 'age'. Is that what you want? Or do you want to instantiate with their types? Can you explain some more what you are trying to do. Ali I

Re: byChunk odd behavior?

2016-03-26 Thread cym13 via Digitalmars-d-learn
On Saturday, 26 March 2016 at 02:28:53 UTC, Hanh wrote: On Friday, 25 March 2016 at 08:01:04 UTC, cym13 wrote: // This consume auto buffer3 = range.take(4).array; assert(buffer3 == [0, 5, 10, 15]); } Thanks for your help. However the last statement is incorrect. I

Re: Template recursion error on table struct

2016-03-26 Thread data pulverizer via Digitalmars-d-learn
On Saturday, 26 March 2016 at 06:28:42 UTC, Ali Çehreli wrote: WARNING: Do not try to compile this code. Your computer may be unresponsive for a while. :) On 03/25/2016 02:54 PM, data pulverizer wrote: > I am attempting to create a table struct with generic column types using > templates.

Re: Template recursion error on table struct

2016-03-26 Thread Ali Çehreli via Digitalmars-d-learn
WARNING: Do not try to compile this code. Your computer may be unresponsive for a while. :) On 03/25/2016 02:54 PM, data pulverizer wrote: > I am attempting to create a table struct with generic column types using > templates. However, the template arguments are not types; rather, aliases. >