BTW, even with hxScout in its somewhat rudimentary state, Lars Doucet has been hard at work optimizing OpenFL and HaxeFlixel using it:
https://twitter.com/larsiusprime/status/641733491609104384
You do have to take into account that 1) profiling adds overhead (e.g. tracking allocations is the most expensive, and it inflates the Garbage Collector latency), and 2) reducing allocations/collections isn't the end-all be-all, but every little bit helps! (You can and should run the profiler with and without allocation tracking.)
It certainly has elucidated some interesting side effects of certain language or framework features. E.g. lots of unexpected things create dynamics or allocate arrays at the cpp level, and may be best avoided in critical code:
- Parametric enums create dynamics
- Lambdas / closures referencing local simple vars create arrays
- Typedefs create dynamics
- Map<Int, Int>.get() returns a dynamic Null<Int>
- Something about args for CFFI calls makes arrays (Joshua or Lars would know more)
- Map.keys() creates an Arary
- etc
These things aren't bad, but they help you know when and what to avoid, how to use a framework or library optimally, and where to spend your time optimizing.
Best,
-Jeff