示例工程 04-collections-cow

04-collections-cow/expected/stdout.txt

text · 0.7 KB

[4.1] 原数组 = [1, 2, 3]
[4.1] 副本改后:原 = [1, 2, 3],副本 = [9, 2, 3]
[4.2] 副本 copyCount = 1,原 copyCount = 0
[4.2] 原 = [1, 2, 3],副本 = [1, 2, 3, 4]
[4.3] slice = 1/3/20/0
[4.3] 父数组改后:父 = [99, 20, 30, 40],切片 = [10, 20]
[4.3] 末尾两个 = [30, 40]
[4.4] Set 排序 = [1, 2, 3]
[4.4] 字典键排序 = ["a", "b", "c"]
[4.4] 字典条目排序 = ["a=1", "b=2", "c=3"]
[4.5] 排名 = ["ann:90", "bob:90", "cy:80"]
[4.5] reserveCapacity(10):capacity = 10,足够 = true
[4.6] MemoryLayout<Array<Int>> = 8 字节
[4.6] MemoryLayout<ArraySlice<Int>> = 32 字节
[4.6] MemoryLayout<Set<Int>> = 8 字节
[4.6] MemoryLayout<Dictionary<String, Int>> = 8 字节