Does dmd have SSE intrinsics?

Christopher Wright dhasenan at gmail.com
Tue Sep 22 15:56:12 PDT 2009


Robert Jacques wrote:
> Yes, although classes have hidden vars, which are runtime dependent, 
> changing the offset. Structs may be embedded in other things (therefore 
> offset). And then there's the whole slicing from an array issue.

Um, no. Field accesses for class variables are (pointer + offset). 
Successive subclasses append their fields to the object, so if you 
sliced an object and changed its vtbl pointer, you could get a valid 
instance of its superclass.

If the class layout weren't determined at compile time, field accesses 
would be as slow as virtual function calls.



More information about the Digitalmars-d mailing list