polymod
polymod copied to clipboard
[ENHANCEMENT] Reflection caching
trafficstars
Querying the list of properties and fields on an object on HXCPP platforms is very expensive, and it could be a moderate performance benefit to cache this information when able.
- Create a map and store the result of
Reflect.fields()on scripted classes. - Check whether a field is a property and use
setFieldoversetPropertywhere appropriate. - Check timings to gauge performance improvements.
- Check whether reflection caching is slower than not using it on JS.