Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread Bauss via Digitalmars-d-announce
On Tuesday, 28 June 2016 at 03:58:23 UTC, Jay Norwood wrote: On Tuesday, 28 June 2016 at 03:11:26 UTC, Jay Norwood wrote: On Tuesday, 28 June 2016 at 01:53:22 UTC, deadalnix wrote: If we were in interview, I'd ask you "what does this returns if you pass it an empty string ?" oops. I see ...

Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread Jay Norwood via Digitalmars-d-announce
On Tuesday, 28 June 2016 at 03:11:26 UTC, Jay Norwood wrote: On Tuesday, 28 June 2016 at 01:53:22 UTC, deadalnix wrote: If we were in interview, I'd ask you "what does this returns if you pass it an empty string ?" oops. I see ... need to test for empty string. nothrow pure size_t

Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread Jay Norwood via Digitalmars-d-announce
On Tuesday, 28 June 2016 at 01:53:22 UTC, deadalnix wrote: If we were in interview, I'd ask you "what does this returns if you pass it an empty string ?" I'd say use this one instead, to avoid negative size_t. It is also a little faster for the same measurement. nothrow pure size_t

Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread deadalnix via Digitalmars-d-announce
On Sunday, 26 June 2016 at 16:40:08 UTC, Jay Norwood wrote: After watching Andre's sentinel thing, I'm playing with strlen on char strings with 4 terminating 0s instead of a single one. Seems to work and is 4x faster compared to the runtime version. nothrow pure size_t strlen2(const(char)*

Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread Mike Parker via Digitalmars-d-announce
On Monday, 27 June 2016 at 19:51:48 UTC, Jay Norwood wrote: I also found it strange, the non-zero initialization values for char, dchar, wchar. I suppose there's some reason? int [100] to zeros. char [100] to 0xff; dchar [100] to 0x; wchar [100] to 0x; The same reason float

Re: Release D 2.071.1

2016-06-27 Thread Jack Stouffer via Digitalmars-d-announce
On Monday, 27 June 2016 at 22:11:53 UTC, Martin Nowak wrote: Glad to announce D 2.071.1. http://dlang.org/download.html This point release fixes a few issues over 2.071.0, see the changelog for more details. http://dlang.org/changelog/2.071.1.html -Martin Glad to see this out :)

Re: Release D 2.071.1

2016-06-27 Thread Jack Stouffer via Digitalmars-d-announce
On Monday, 27 June 2016 at 23:15:06 UTC, Robert burner Schadek wrote: Awesome, releases are becoming more and more boring. I like it! I wouldn't call 1.0 * -1.0 == 1.0 boring!

Re: Release D 2.071.1

2016-06-27 Thread Robert burner Schadek via Digitalmars-d-announce
Awesome, releases are becoming more and more boring. I like it!

Release D 2.071.1

2016-06-27 Thread Martin Nowak via Digitalmars-d-announce
Glad to announce D 2.071.1. http://dlang.org/download.html This point release fixes a few issues over 2.071.0, see the changelog for more details. http://dlang.org/changelog/2.071.1.html -Martin

Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread Ola Fosheim Grøstad via Digitalmars-d-announce
On Monday, 27 June 2016 at 21:41:57 UTC, Jay Norwood wrote: measurements. I'm using a 100KB char array terminated by four zeros, and doing strlen on substring pointers into it incremented by 1 for 100K times. But this is a rather atypical use case for zero terminated strings? It would make

Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread Jay Norwood via Digitalmars-d-announce
On Monday, 27 June 2016 at 20:43:40 UTC, Ola Fosheim Grøstad wrote: Just keep in mind that the major bottleneck now is loading 64 bytes from memory into cache. So if you test performance you have to make sure to invalidate the caches before you test and test with spurious reads over a very

Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread Ola Fosheim Grøstad via Digitalmars-d-announce
On Monday, 27 June 2016 at 06:31:49 UTC, Ola Fosheim Grøstad wrote: On Monday, 27 June 2016 at 05:27:12 UTC, chmike wrote: Ending strings with a single null byte/char is to save space. It was critical in the 70´s when C was created and memory space was very limited. That's not the case anymore

Re: Another audio plugin in D

2016-06-27 Thread Jacob Carlborg via Digitalmars-d-announce
On 27/06/16 21:22, Guillaume Piolat wrote: My wording was a bit strong. As you may remember, the workaround involved "leaking" the dynlib. On OS X I keep having a lingering crash which is a bit random, happens with multiple instantiation/closing of a dynlib. It is a bit hard to reproduce and

Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread Ola Fosheim Grøstad via Digitalmars-d-announce
On Monday, 27 June 2016 at 19:51:48 UTC, Jay Norwood wrote: Your link's use of padding pads out with a variable number of zeros, so that a larger data type can be used for the compare operations. This isn't the same as my example, which is simpler due to not having to fiddle with alignment

Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread Jay Norwood via Digitalmars-d-announce
On Monday, 27 June 2016 at 16:38:58 UTC, Ola Fosheim Grøstad wrote: Yes, and the idea of speeding up strings by padding out with zeros is not new. ;-) I recall suggesting it back in 1999 when discussing the benefits of having a big endian cpu when sorting strings. If it is big endian you can

Re: Beta D 2.071.1-b2

2016-06-27 Thread Martin Nowak via Digitalmars-d-announce
On 06/16/2016 08:43 PM, Jack Stouffer wrote: > On Sunday, 29 May 2016 at 21:53:23 UTC, Martin Nowak wrote: >> Second beta for the 2.071.1 release. >> >> http://dlang.org/download.html#dmd_beta >> http://dlang.org/changelog/2.071.1.html >> >> Please report any bugs at https://issues.dlang.org >> >>

Re: Beta D 2.071.1-b2

2016-06-27 Thread Martin Nowak via Digitalmars-d-announce
On 06/16/2016 09:47 PM, deadalnix wrote: > 196418a8b3ec1c5f284da5009b4bb18e3f70d99f still not in after 3 month. > This is typesystem breaking. While I understand it wasn't picked for > 2.071 , I'm not sure why it wasn't for 2.071.1 . Because it didn't target stable.

Re: Another audio plugin in D

2016-06-27 Thread Guillaume Piolat via Digitalmars-d-announce
On Monday, 27 June 2016 at 18:59:35 UTC, Jacob Carlborg wrote: On 27/06/16 13:02, Guillaume Piolat wrote: Unloading of shared libraries on OS X continues to be a problem though, it would be nice if it worked in 64-bit. I know the current situation is not ideal, but does it cause any

Re: Another audio plugin in D

2016-06-27 Thread Jacob Carlborg via Digitalmars-d-announce
On 27/06/16 13:02, Guillaume Piolat wrote: Unloading of shared libraries on OS X continues to be a problem though, it would be nice if it worked in 64-bit. I know the current situation is not ideal, but does it cause any problems? -- /Jacob Carlborg

Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread Brad Roberts via Digitalmars-d-announce
On 6/26/2016 11:47 AM, Jay Norwood via Digitalmars-d-announce wrote: On Sunday, 26 June 2016 at 16:59:54 UTC, David Nadlinger wrote: Please keep general discussions like this off the announce list, which would e.g. be suitable for announcing a fleshed out collection of high-performance string

Re: [Semi OT] About code review

2016-06-27 Thread Johan Engelen via Digitalmars-d-announce
On Monday, 27 June 2016 at 00:01:34 UTC, deadalnix wrote: Several people during DConf asked abut tips and tricks on code review. So I wrote an article about it: http://www.deadalnix.me/2016/06/27/on-code-review/ It's a nice read. One comment: perhaps the balance has tipped a bit much to

Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread Ola Fosheim Grøstad via Digitalmars-d-announce
On Monday, 27 June 2016 at 16:22:56 UTC, Jay Norwood wrote: This strlen2 doesn't require special alignment or casting of char pointer types to some larger type. That keeps the strlen2 implementation fairly simple. Yes, and the idea of speeding up strings by padding out with zeros is not new.

Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread Jay Norwood via Digitalmars-d-announce
On Monday, 27 June 2016 at 06:31:49 UTC, Ola Fosheim Grøstad wrote: Besides there are plenty of other advantages to using a terminating sentinel depending on the use scenario. E.g. if you want many versions of the same tail or if you are splitting a string at white space (overwrite a white

Re: [Semi OT] About code review

2016-06-27 Thread Steven Schveighoffer via Digitalmars-d-announce
On 6/26/16 8:01 PM, deadalnix wrote: Several people during DConf asked abut tips and tricks on code review. So I wrote an article about it: http://www.deadalnix.me/2016/06/27/on-code-review/ Very nice. One thing missing: Always remember to update documentation when submitting updates! Can

Re: PowerNex - New release of my D kernel

2016-06-27 Thread Guest via Digitalmars-d-announce
Also mentioned on OSNews: http://www.osnews.com/comments/29268

Another audio plugin in D

2016-06-27 Thread Guillaume Piolat via Digitalmars-d-announce
Greetings, Auburn Sounds has released his second product fully made in D. It is intended to solve the following audio mixing problems: - "I need to put more stereo in this track" and - "regular panning doesn't sound that good on headphones".

Re: [Semi OT] About code review

2016-06-27 Thread Walter Bright via Digitalmars-d-announce
On 6/26/2016 5:01 PM, deadalnix wrote: http://www.deadalnix.me/2016/06/27/on-code-review/ Nice article!

Re: Button: A fast, correct, and elegantly simple build system.

2016-06-27 Thread Jason White via Digitalmars-d-announce
On Monday, 27 June 2016 at 06:43:26 UTC, Rory McGuire wrote: FYI, I implemented this feature today (no Batch/PowerShell output yet though): http://jasonwhite.github.io/button/docs/commands/convert I think Bash should work on most Unix-like platforms. And there is this[0] for windows,

Re: Button: A fast, correct, and elegantly simple build system.

2016-06-27 Thread Rory McGuire via Digitalmars-d-announce
On Mon, Jun 27, 2016 at 2:23 AM, Jason White via Digitalmars-d-announce < digitalmars-d-announce@puremagic.com> wrote: > On Monday, 20 June 2016 at 08:21:29 UTC, Dicebot wrote: > >> On Monday, 20 June 2016 at 02:46:13 UTC, Jason White wrote: >> >>> This actually sounds nice. Main problem that

Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread Ola Fosheim Grøstad via Digitalmars-d-announce
On Monday, 27 June 2016 at 05:27:12 UTC, chmike wrote: Ending strings with a single null byte/char is to save space. It was critical in the 70´s when C was created and memory space was very limited. That's not the case anymore and I guess the Not only to save space, some CPUs also had cheap