pinojs / quick-format-unescaped

Solves a problem with util.format
MIT License
17 stars 13 forks source link

Update index.js #15

Closed weivea closed 3 years ago

weivea commented 6 years ago

cover case which arg is an instance of Error

davidmarkclements commented 6 years ago

can you please post benchmark before/after results in this thread?

instanceof is notoriously slow in the Turbofan V8 – if we can't do this in a fast way I'd rather not do it

if we do merge, then we'll also want to put it into quick-format-unescaped branch which is used 200x more than quick-format - so it's 200 times more important that this change doesn't hinder performance