I'm working on the Haxe port of Starling v2.0, a 2D game library that 
utilizes WebGL for rendering.I'm wondering if I can optimize its rendering 
further.

First version of v2.0 port was really slower than v1.8.x(older version) 
because it was using DataView for reading/writing data. I've found that 
loops that contains read/write operations with DataView will not be 
optimized.
Using typed arrays with wrapper class made performance better, though 
v2.0's performance is still not good as v1.8.x. Maybe because v2.0's loop 
is much complex than v1.8.x.

I know that there are other reason that make rendering slower, but does 
this code contribute to that?

https://gist.github.com/vroad/4c5d3b06f7782dfca7fd12408bead324 (Extracted 
from JavaScript output)
https://github.com/openfl/starling/blob/10e111af1c248e1f7bb46d4fe10f0d61facc4043/starling/rendering/VertexData.hx#L260-L269
 
(Haxe source code)

Compared to this, v1.8.x's loop is much simpler.

https://github.com/openfl/starling/blob/v1.8.x/starling/utils/VertexData.hx#L121-L131

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to