Re: Immutable Datastructures with good Sharing

markspace schrieb:
Cloning or copying has got to be slow.

Yes, thats why I wrote (21:33):

"When you clone you need to go through the whole array and copy
each element, this takes time. When you share, you don't need
to spend this time."

Probably there is a problem with the newsreader
used by you guys. I see this over and over by
posts here from various people, they only use
a very small view of the thread as context.


Relevant Pages

  • Re: MemberwiseClone() doesnt like arrays?
    ... separate array. ... will need to write Clone yourself, ... I have lots of classes inheriting from those ... classes, adding more members still. ...
  • Re: Whats the use of cloning?
    ... Here's what ur clone method could look like to return a deep clone of ... the integer array: ... > values of the original object, but the changes of the cloned object should ...
  • Re: Clone java collection & static variable??
    ... Your code is consistent with shallow copies. ... I thought a shallow copy would be when you call cloneon an array, ... It also clone object references inside the array. ... reference to the collection and clone the object reference it contains, ...
  • New to Ruby: copying arrays?
    ... I've done some programming in Delphi ... which is a two-dimensional array of 9x9. ... I've tried .dup and .clone methods, but it didn't work because @board ... Is there a simple and elegant way to duplicate ...
  • MemberwiseClone() doesnt like arrays?
    ... One of the elements of the class is an array and although the Clone ... public class TestClone: ICloneable ... private int[] data; ...