Arch
Arch copied to clipboard
Duplicate()
I want a convenient way to duplicate entities.
At the moment you need to call GetAllComponents(), which is unsatisfying.
This implementation is faster, and could be made more efficient in future.
On my (rather old) computer (N=10000):
| Method | Mean | Error | StdDev |
|---|---|---|---|
| DuplicateNInternal | 8.099 ms | 0.3745 ms | 1.0438 ms |
| DuplicateNDuplicate | 8.874 ms | 0.3976 ms | 1.1662 ms |
| DuplicateNGetAllComponents | 31.285 ms | 0.5823 ms | 0.7971 ms |