On 07/06/2014 05:19 AM, Wanderer wrote:
On Saturday, 5 July 2014 at 16:03:17 UTC, Dmitry Olshansky wrote:
...
Pointers are perfectly fine as long as there is no pointer arithmetic.

Wrong. Merely holding a pointer (i.e. a physical address) is unsafe
already. Non-deep serialization, or any other "preservation" of such a
struct and GC is unable to keep the track of pointers. GC moves the
object around or deletes it, and you have a tiny black hole in your app.
...

That's not 'merely holding a pointer' and it applies to class references just as much.

...

If you're really into the low-level mumbo jumbo, here are two more
aspects for you to consider.

1. Since indirection does not require the object contents to be moved
around while sorting, these objects can be read into cache once and
never invalidated later  - unlike "right in place" structs which
invalidate CPU cache each time a swap is performed. That is a huge cache
win already.
...

This is just random nonsense.

Reply via email to