mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Optimize _.unescape.
This commit is contained in:
30
perf/perf.js
30
perf/perf.js
@@ -885,12 +885,12 @@
|
||||
Benchmark.Suite('`_.every` iterating an array')
|
||||
.add(buildName, '\
|
||||
lodash.every(numbers, function(num) {\
|
||||
return num + "";\
|
||||
return num;\
|
||||
})'
|
||||
)
|
||||
.add(otherName, '\
|
||||
_.every(numbers, function(num) {\
|
||||
return num + "";\
|
||||
return num;\
|
||||
})'
|
||||
)
|
||||
);
|
||||
@@ -899,12 +899,12 @@
|
||||
Benchmark.Suite('`_.every` iterating an object')
|
||||
.add(buildName, '\
|
||||
lodash.every(object, function(num) {\
|
||||
return num + "";\
|
||||
return num;\
|
||||
})'
|
||||
)
|
||||
.add(otherName, '\
|
||||
_.every(object, function(num) {\
|
||||
return num + "";\
|
||||
return num;\
|
||||
})'
|
||||
)
|
||||
);
|
||||
@@ -1844,6 +1844,28 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.unescape` string without html entities')
|
||||
.add(buildName, '\
|
||||
lodash.unescape("`&`, `<`, `>`, `\\"`, and `\'`")'
|
||||
)
|
||||
.add(otherName, '\
|
||||
_.unescape("`&`, `<`, `>`, `\\"`, and `\'`")'
|
||||
)
|
||||
);
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.unescape` string with html entities')
|
||||
.add(buildName, '\
|
||||
lodash.unescape("`&`, `<`, `>`, `"`, and `'`")'
|
||||
)
|
||||
.add(otherName, '\
|
||||
_.unescape("`&`, `<`, `>`, `"`, and `'`")'
|
||||
)
|
||||
);
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.union`')
|
||||
.add(buildName, '\
|
||||
|
||||
Reference in New Issue
Block a user