Page 2 of 2
Posted: Sun Oct 28, 2012 9:59 pm
Kjell wrote:Anyway, it does make you wonder how significant the performance penalty of FileMoveData's ( silly ) char to float conversion is in the entire overhead of the call.
Is it possible to make char-to-float conversion faster? Or what about to support char type in ZGE? Another improvement would be accessing the loaded file as an array - e.g. File would (optionally) take a 1-dimensional array as property and set its "start" to memory with imported file + SizeDim1 to the length of the file on Read FileAction. Is there some restriction for dimensions of arrays?
Posted: Mon Oct 29, 2012 8:07 am
Good suggestions Rado1, I'll try to implement that array idea. Please remind me if it doesn't appear soon.
Posted: Mon Oct 29, 2012 12:21 pm
I took some time to test this right away.
Download the beta again.
See attached project. It currently only works with Arrays of integer type but we could add support for strings to read a text file directly into an array of string. And it only supports reading, but writing could be supported as well. Anyway, please try this and see if speed improves!
Posted: Mon Oct 29, 2012 1:59 pm
Ville, this is really useful improvement! Attached, you will find a new version of obj loader using array access to the loaded files. Its performance improved in average by 28% on Windows and 31% on relatively slow Android mobile. Original, string-based versions of the obj loader were 40-50% slower.