使用超大字符串数组

时间:2017-10-01 18:47:42

标签: arrays swift string

有一个大约50,000个单词的数组。索引需要花费大量时间。有时会停止。如果有大约1000个单词,没问题。

另一个类中的数组。

我试过这些:

let arr: [String] = ["str1", "str2", ...]

let arr: [String] = [

"str1",

"str2",

...]

let arr1: [String] = ["str1", "str2", ..., "str9999"]

let arr2: [String] = ["str10000", "str10001", ..., "str19999"]

...

let arr5: [String] = ["str40000", "str40001", ..., "str50000"]

使用大型数组的最佳方法是什么?提前感谢您的建议。

0 个答案:

没有答案
相关问题