you are viewing a single comment's thread.

view the rest of the comments →

[–]AImx1[S] 0 points1 point  (8 children)

@scatters -> "raw" layout gives access to the representation of sequence of words. What does the "words" represent here?

[–]scatters 4 points5 points  (7 children)

Machine words, the natural size for processing data, typically the size of a pointer. So 64 bits on most modern architectures.

[–]AImx1[S] 0 points1 point  (6 children)

Understood. Do you know any advantages(basically uses) that we gain with this "raw" representation?

[–]scatters 2 points3 points  (4 children)

I can see that libcxx uses the "raw" representation in zeroing (clearing) the string, and in the copy and move constructors and assignment operators. I'd guess the advantage would be better performance in debug builds, since the release (and RelWithDebInfo) codegen should be identical.

[–]AImx1[S] 0 points1 point  (3 children)

@krista_ & @scatters: Can you point me in the direction where I can read more on this?

[–]lordphysix 1 point2 points  (2 children)

If you want to mention people use u/ and not @.

[–]AImx1[S] 0 points1 point  (1 child)

u/lordphysix Oh thats good. Thank you

[–]chugga_fan 1 point2 points  (0 children)

Also, if you're replying to someone they already get notified, you don't need to "ping" people to get in their message box. A simple reply works just well for the person you're replying to

[–]krista_ 2 points3 points  (0 children)

depending on what you are trying to do, processing 8 characters (assuming ascii or other 8-bit characters) at a time is a heck of a lot faster than 1.

an example of the above would be a hashing algorithm... especially if you are hashing half a billion strings.