Hi Joel,
Loving the ease of use of ES2, but I'm finding single load calls to be a bit slow for what I need to do --
So, my question is: which of the available ES2 Load Methods would give THE best performance loading roughly 50 variables?
All the values are int & bools so I could probably represent them all as int's if, say, (1) array would be the fastest. I don't suppose
this would make a difference, but writing speed isn't a concern in this particular case.
Thanks!
- Igor
Quickest ES2 load method for (50) int/bool values?
Re: Quickest ES2 load method for (50) int/bool values?
Did a little research while waiting for a reply -- seems like on the C# side I'd probably want to go with a Dictionary.
Here's a little study: http://blog.bodurov.com/Performance-Sor ... Hashtable/
Venturing a guess answer to my question -- wouldn't all the 'bulk' loading methods be pretty much equivalent in ES2
given that they are essentially fetching a single object?
Thanks again,
- i
Here's a little study: http://blog.bodurov.com/Performance-Sor ... Hashtable/
Venturing a guess answer to my question -- wouldn't all the 'bulk' loading methods be pretty much equivalent in ES2
given that they are essentially fetching a single object?
Thanks again,
- i
Re: Quickest ES2 load method for (50) int/bool values?
Hi there,
A native array would technically be the fastest to Save and Load as it requires less overhead, but there wouldn't be that much difference. For reference, a 2009 iMac can save an array of 20,000 Transforms (position, rotation, scale, tag) in under 200ms.
Also with regards to saving ints and bools, there wouldn't really be much difference in performance if you saved the two arrays separately, especially if you take into consideration the cost of casting the bool to an int.
All the best,
Joel
A native array would technically be the fastest to Save and Load as it requires less overhead, but there wouldn't be that much difference. For reference, a 2009 iMac can save an array of 20,000 Transforms (position, rotation, scale, tag) in under 200ms.
Also with regards to saving ints and bools, there wouldn't really be much difference in performance if you saved the two arrays separately, especially if you take into consideration the cost of casting the bool to an int.
All the best,
Joel
Re: Quickest ES2 load method for (50) int/bool values?
20k in 200ms sounds brilliant. Will give ES2.LoadArray a shot. Thanks, Joel