Ian Halliday
Ian Halliday
@orangemocha @ofrobots here is the [template machinery](https://gist.github.com/ianwjhalliday/3ca4d01b74d8b3de40f5) that @geoffkizer proposed and experimented with. It relies on C++11 variadic templates. This example only works for int32_t return and parameter types, but...
Good find. Looks like quality precedent for the approach. Would we want to use it directly in node and node modules? If its public API remains stable over V8 API...
Getting the API to use `v8::FunctionTemplate` improved the numbers significantly for the test suite. Benchmarks remained the same, including the 5% slow down `write-sorted.js`. Updated gist with raw numbers https://gist.github.com/ianwjhalliday/236bdb53448a372536793580c0882197#file-leveldown-perf-results-raw-with-create-constructor-improvement...
Looks good to me. Should wait for input from others though. @trevnorris @pmuellr ?