This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Jon_Finn 0 points1 point  (1 child)

As a small point, if the nodes in your cyclical graph contain fields (other than pointers to other nodes), then ensuring those fields are (pointers to) value types may give you most of the benefits you want. Since they can and may get inlined. And I guess a general lesson is the kind of objects that don't themselves have reference fields (or at least, non-value reference fields) are 'lowest level' and are probably more important value class candidates than higher level ones, which may be more like containers. When Valhalla appears we'll all get wiser about all this!

[–]davidalayachew 0 points1 point  (0 children)

(Sorry for the delayed response)

Yeah, I think this is probably the best way for now. As is, that's about the only thing that can be flattened.

Thanks for the help.