String compare performance

Jonathan M Davis jmdavisProg at gmx.com
Sat Nov 27 14:54:00 PST 2010


On Saturday 27 November 2010 14:46:00 bearophile wrote:
> denis.spir
> > Also, is there a way to bit-compare given memory areas at much higher
> > speed than element per element (I mean for arrays in general)?
> 
> I don't know. I think you can't.

You might be able to do that for primitive types and for structs with no 
opEquals() and with no member variables with an opEquals(), but you certainly 
can't do it in the general case, since in the general case, you'd have to be 
calling opEquals() on each element individually.

- Jonathan M Davis


More information about the Digitalmars-d mailing list