Re: wmemchar for unix

2013-08-27 Thread Dmitry Olshansky
27-Aug-2013 23:31, H. S. Teoh пишет: On Tue, Aug 27, 2013 at 11:18:50PM +0400, Dmitry Olshansky wrote: 27-Aug-2013 18:41, H. S. Teoh пишет: [snip] I'm not sure if dmd does that optimization. If you really feel inclined, you could do static if (X86) and throw in an asm block (but that would b

Re: wmemchar for unix

2013-08-27 Thread H. S. Teoh
On Tue, Aug 27, 2013 at 11:18:50PM +0400, Dmitry Olshansky wrote: > 27-Aug-2013 18:41, H. S. Teoh пишет: > >On Tue, Aug 27, 2013 at 07:37:02AM -0700, Sean Kelly wrote: > >>On Aug 26, 2013, at 11:57 PM, monarch_dodra wrote: > >> > >>>For performance reasons, I need a "w" version of memchr. > >>> >

Re: wmemchar for unix

2013-08-27 Thread Dmitry Olshansky
27-Aug-2013 18:41, H. S. Teoh пишет: On Tue, Aug 27, 2013 at 07:37:02AM -0700, Sean Kelly wrote: On Aug 26, 2013, at 11:57 PM, monarch_dodra wrote: For performance reasons, I need a "w" version of memchr. C defines wmemchr as: wchar_t * wmemchr ( const wchar_t *, wchar_t, size_t ); Unfortun

Re: wmemchar for unix

2013-08-27 Thread monarch_dodra
On Tuesday, 27 August 2013 at 14:43:10 UTC, H. S. Teoh wrote: On Tue, Aug 27, 2013 at 07:37:02AM -0700, Sean Kelly wrote: On Aug 26, 2013, at 11:57 PM, monarch_dodra wrote: > For performance reasons, I need a "w" version of memchr. > > C defines wmemchr as: > wchar_t * wmemchr ( const wchar

Re: wmemchar for unix

2013-08-27 Thread monarch_dodra
On Tuesday, 27 August 2013 at 14:37:14 UTC, Sean Kelly wrote: On Aug 26, 2013, at 11:57 PM, monarch_dodra wrote: For performance reasons, I need a "w" version of memchr. C defines wmemchr as: wchar_t * wmemchr ( const wchar_t *, wchar_t, size_t ); Unfortunatly, on unix, "wchar_t" is defined

Re: wmemchar for unix

2013-08-27 Thread H. S. Teoh
On Tue, Aug 27, 2013 at 07:37:02AM -0700, Sean Kelly wrote: > On Aug 26, 2013, at 11:57 PM, monarch_dodra wrote: > > > For performance reasons, I need a "w" version of memchr. > > > > C defines wmemchr as: > > wchar_t * wmemchr ( const wchar_t *, wchar_t, size_t ); > > > > Unfortunatly, on unix

Re: wmemchar for unix

2013-08-27 Thread Sean Kelly
On Aug 26, 2013, at 11:57 PM, monarch_dodra wrote: > For performance reasons, I need a "w" version of memchr. > > C defines wmemchr as: > wchar_t * wmemchr ( const wchar_t *, wchar_t, size_t ); > > Unfortunatly, on unix, "wchar_t" is defined a *4* bytes long, > making wmemchr, effectivelly, "dm