1 import deepClone from 'deep-clone'
2 import clone from 'just-clone'
4 import { clone as rambdaClone } from 'rambda'
5 import { bench, group, run } from 'tatami-ng'
7 import { generateRandomObject } from './benchmark-utils.mjs'
9 const object = generateRandomObject()
11 group(`Deep clone object with ${Object.keys(object).length} keys`, () => {
12 bench('JSON stringify/parse', (obj = object) => {
13 JSON.parse(JSON.stringify(obj))
15 bench('structuredClone', (obj = object) => {
18 bench('lodash cloneDeep', (obj = object) => {
21 bench('rambda clone', (obj = object) => {
24 bench('just-clone', (obj = object) => {
27 bench('deep-clone', (obj = object) => {