perf_hooks: implement performance.now() with fast API calls#50492
perf_hooks: implement performance.now() with fast API calls#50492nodejs-github-bot merged 1 commit intonodejs:mainfrom
Conversation
|
I haven't kept up with fast calls lately but originally the double return type was only supported on some architectures. Do we know that this is actually optimizing the call everywhere? |
|
Haven’t really looked into if it’s always optimized but I think fast APIs are not guaranteed to always be hit anyway, that’s why the slow fallback callbacks are required. |
|
@joyeecheung i think my only concern would be whether this was, in practice, a regression on any of our supported platforms. maybe a benchmark run could double check? |
|
We only have benchmark CI on Ubuntu x64 but here is a CI run https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1469/
JSCallReducer should just skip generating fast calls for signatures that are not supported on the running platform, that's why the slow callback is required. If a regression can be caused by running a fast call on a platform it cannot optimize, that sounds more like an internal bug of V8... |
|
From benchmark CI: |
|
Landed in 8c7fe47 |
PR-URL: #50492 Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Bryan English <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Stephen Belanger <[email protected]>
PR-URL: nodejs#50492 Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Bryan English <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Stephen Belanger <[email protected]>
PR-URL: nodejs#50492 Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Bryan English <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Stephen Belanger <[email protected]>
PR-URL: #50492 Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Bryan English <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Stephen Belanger <[email protected]>
PR-URL: #50492 Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Bryan English <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Stephen Belanger <[email protected]>
PR-URL: #50492 Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Bryan English <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Stephen Belanger <[email protected]>
PR-URL: #50492 Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Bryan English <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Stephen Belanger <[email protected]>
Local benchmark numbers: