Skip to content

Commit

Permalink
Update benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
nebrelbug committed Mar 26, 2020
1 parent 1defecc commit 64b04c0
Showing 1 changed file with 37 additions and 32 deletions.
69 changes: 37 additions & 32 deletions browser-tests/benchmark.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/* eslint-disable dot-notation, space-before-function-paren */
/* global template, doT, ejs, Handlebars, Sqrl, Mustache, swig, Highcharts, Eta */

// TODO: Re-enable Squirrelly when it has a stable release

/*
Modified from AUI's docs. See their license below:
Expand All @@ -14,6 +16,9 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

Eta.defaultConfig.autoTrim = false
Sqrl.defaultConfig.autoTrim = false

var templateList = {}

templateList['template'] = `
Expand Down Expand Up @@ -270,38 +275,38 @@ var testList = [
return html
}
},
{
name: 'Squirrelly',
tester: function() {
if (!config.escape) {
Sqrl.defaultConfig.autoEscape = false
}
var source = templateList['squirrelly']
// console.log(fn.toString())
var html = ''
data.$name = 'temp'
for (var i = 0; i < config.calls; i++) {
html = Sqrl.render(source, data)
}
return html
}
},
{
name: 'Squirrelly - Fast',
tester: function() {
if (!config.escape) {
Sqrl.defaultConfig.autoEscape = false
}
var source = templateList['squirrelly-fast']
// console.log(fn.toString())
var html = ''
data.$name = 'temp'
for (var i = 0; i < config.calls; i++) {
html = Sqrl.render(source, data)
}
return html
}
},
// {
// name: 'Squirrelly',
// tester: function() {
// if (!config.escape) {
// Sqrl.defaultConfig.autoEscape = false
// }
// var source = templateList['squirrelly']
// // console.log(fn.toString())
// var html = ''
// data.$name = 'temp'
// for (var i = 0; i < config.calls; i++) {
// html = Sqrl.render(source, data)
// }
// return html
// }
// },
// {
// name: 'Squirrelly - Fast',
// tester: function() {
// if (!config.escape) {
// Sqrl.defaultConfig.autoEscape = false
// }
// var source = templateList['squirrelly-fast']
// // console.log(fn.toString())
// var html = ''
// data.$name = 'temp'
// for (var i = 0; i < config.calls; i++) {
// html = Sqrl.render(source, data)
// }
// return html
// }
// },
{
name: 'Eta',
tester: function() {
Expand Down

0 comments on commit 64b04c0

Please sign in to comment.