3 ms·
> Another issue is that you have copying semantics by default. The claim is that this can make things faster, but for common objects like arrays and dictionarie
by josephlord 12y ago
> Another issue is that you have copying semantics by default. The claim is that this can make things faster, but for common objects like arrays and dictionaries it first makes things a lot slower (once they fix the completely borked array semantics).
But when they say "copy semantics" (actually I think it was "value semantics") they mean copy on write semantics. There are tricks that they can do to ensure the copy is pretty rare. If the array passed to a function is not used later in the calling function no copy should be needed. If it is not changed in caller or callee then no copy is needed.
Yes there may be a hit at times but it should be fairly rare.
I'm very glad that they are fixing the borked array semantics, I complained pretty bitterly about that.