views:

123

answers:

1

Is it clean enough that you can discard the PHP and hand-optimize the C++ code?

+4  A: 
Alex R
Wow! That was a mouthful!
Kimble
Wow, that's awful!
kroimon
That seem "normal" as there seem to be a lot of code to simulate php features, so most of what you see generated is "binding" code (but that's not the right word). You should not be surprised for such code as it is generated from a totally different paradigms based language. A C++ programmer writing from scratch would have written the same thing with almost the same size of code than your php snippet (using STL).
Klaim
That said, +1 : it's definitively not hand-optimizable. It seem already optimized a lot (but to be sure, a look at some macro definitions would be necessary).
Klaim
It seems to me the HipHop developers didn't really go out of their way to make the output readable. They COULD have employed inheritance, templates, and macros to reduce the amount of explicit "binding" code.
Alex R