From caf3206d35e48bf964bfdd380babd794ca2fb00a Mon Sep 17 00:00:00 2001 From: Postbot Date: Thu, 7 Sep 2017 22:28:23 +0800 Subject: [PATCH] Create _benchmarks/assignment-vs-recalculation.md --- _benchmarks/assignment-vs-recalculation.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 _benchmarks/assignment-vs-recalculation.md diff --git a/_benchmarks/assignment-vs-recalculation.md b/_benchmarks/assignment-vs-recalculation.md new file mode 100644 index 00000000..421f7355 --- /dev/null +++ b/_benchmarks/assignment-vs-recalculation.md @@ -0,0 +1,15 @@ +--- +title: assignment vs recalculation +setup: | + var source = {c: "c", d: "d"}; +tests: + - + name: assignment + code: | + var result = Object.assign({}, source); + - + name: recalculation + code: | + var result = {c: "c", d: "d"}; +--- +assignment vs recalculation