Skip to content
Myr

Add structura and limu as versions

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Mark Erikson · committed by Mark Erikson · parent 85b891b · Browse files · 1 file+18 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+18 added−6 removed

  • other:+18 added−6 removed

1 file+18 added−6 removed

modified:perf-testing/immutability-benchmarks.mjs+18 added-6 removed
17 unmodified lines
18import {19 produce as produceMutativeCompat,20 setAutoFreeze as setAutoFreezeMutativeCompat21} from "mutative-compat"22import {23 produce as produceStructura,24 enableAutoFreeze as setAutoFreezeStructura25} from "structurajs"26import {produce as produceLimu, setAutoFreeze as setAutoFreezeLimu} from "limu"27import {bench, run, group, summary} from "mitata"2829function createInitialState() {30 const initialState = {
41 unmodified lines
7273const immerProducers = {74 // immer5: produce5,75 // immer6: produce6,71 immer7: produce7,72 immer8: produce8,73 immer9: produce9,76 // immer7: produce7,77 // immer8: produce8,78 // immer9: produce9,79 immer10: produce10,80 immer10Perf: produce10Perf81 // mutative: produceMutative,77 // mutativeCompat: produceMutativeCompat82 // mutativeCompat: produceMutativeCompat,83 // structura: produceStructura,84 // limu: produceLimu85}8687const noop = () => {}88
6 unmodified lines
95 immer9: setAutoFreeze9,96 immer10: setAutoFreeze10,97 immer10Perf: setAutoFreeze10Perf,98 mutative: noop,92 mutativeCompat: setAutoFreezeMutativeCompat99 mutativeCompat: setAutoFreezeMutativeCompat,100 structura: setAutoFreezeStructura,101 limu: setAutoFreezeLimu102}103104const setStrictIteration = {105 vanilla: noop,
4 unmodified lines
110 immer9: noop,111 immer10: noop,112 immer10Perf: noop, // setUseStrictIteration10Perf,113 mutative: noop,105 mutativeCompat: noop114 mutativeCompat: noop,115 structura: noop,116 limu: noop117}118}119120const vanillaReducer = (state = createInitialState(), action) => {121 switch (action.type) {122 case "test/addItem":
135 unmodified lines