perf(*): use Object.create instead of creating temporary constructors

Closes #10058