From 23f268c55a02bbd559d9f841b433f7cdf50f0566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Isager=20Dalsgar=C3=B0?= Date: Wed, 3 Apr 2024 11:57:48 +0200 Subject: [PATCH] Add `structuredClone()` benchmark --- .../platform/structured-clone.bare+node+bun.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 bench/platform/structured-clone.bare+node+bun.js diff --git a/bench/platform/structured-clone.bare+node+bun.js b/bench/platform/structured-clone.bare+node+bun.js new file mode 100644 index 00000000..a887592c --- /dev/null +++ b/bench/platform/structured-clone.bare+node+bun.js @@ -0,0 +1,17 @@ +/* global bench */ + +require('../harness') + +const object = { + string: 'hello world', + number: 42, + boolean: true, + array: ['element'], + object: { + key: 'value' + } +} + +bench('structuredClone()', () => { + structuredClone(object) +})