1

In manipulating data in Flash, which data format gives faster speeds in terms of searching and manipulation, XML or nested associative arrays? Meaning I currently send data in strings into the Flash client (I don't want to load an XML file) but I'm not sure if formatting the data into an XML file or into nested associative arrays is better in terms of performance. What about data size? Does formatting the data in XML result in smaller or larger data size (which ultimately contributes to the size of the flash client file)?

4

2 回答 2

1

自己回答这个问题的最佳方法是执行基准测试。在循环中对您的数据执行一些操作并记录开始和结束时间。我感觉您会发现数组的性能会更好,因为需要先解析 XML,然后才能使用其中的数据。但是你绝对应该做基准来验证。

于 2009-10-28T03:32:12.173 回答
0

那将取决于您的数据。如果你的数据很大,xml会更快,但是如果你的数据很小,你可以使用array。

于 2009-10-28T03:26:32.620 回答