2024-04-25 14:56:13 +03:00
|
|
|
import { xorWith as xorWithToolkit } from 'es-toolkit';
|
|
|
|
import { xorWith as xorWithLodash } from 'lodash';
|
2024-06-04 11:19:26 +03:00
|
|
|
import { bench, describe } from 'vitest';
|
2024-04-25 14:56:13 +03:00
|
|
|
|
|
|
|
describe('xorWith', () => {
|
2024-06-18 04:40:07 +03:00
|
|
|
bench('es-toolkit/xorWith', () => {
|
2024-04-25 14:56:13 +03:00
|
|
|
xorWithToolkit([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], (x, y) => x.id === y.id);
|
2024-06-04 11:19:26 +03:00
|
|
|
});
|
2024-04-25 14:56:13 +03:00
|
|
|
|
2024-06-18 04:40:07 +03:00
|
|
|
bench('lodash/xorWith', () => {
|
2024-04-25 14:56:13 +03:00
|
|
|
xorWithLodash([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], (x, y) => x.id === y.id);
|
2024-06-04 11:19:26 +03:00
|
|
|
});
|
2024-04-25 14:56:13 +03:00
|
|
|
});
|