update benchmark suite, update benchmark output
This commit is contained in:
parent
f8645ae4ea
commit
ec40a321e3
23
bench.sh
Executable file
23
bench.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
export PYTHONPATH=$PWD
|
||||
cleanup() {
|
||||
rm -f -- "$out"
|
||||
}
|
||||
out="$(mktemp)"
|
||||
trap cleanup EXIT
|
||||
|
||||
for v in 3.4 3.3 3.2 3.1 3.0 2.7 2.6 2.5 2.4; do
|
||||
(
|
||||
set -e
|
||||
|
||||
p=python$v
|
||||
$p make.py makefile
|
||||
CFLAGS=-O3 make clean compile
|
||||
$p -OO bench/main.py -p >( cat - >>"$out" ) bench/*.js
|
||||
)
|
||||
done
|
||||
python make.py makefile
|
||||
|
||||
python -mbench.write -p docs/BENCHMARKS <"$out"
|
@ -0,0 +1,30 @@
|
||||
# -*- coding: ascii -*-
|
||||
r"""
|
||||
=================================
|
||||
Benchmark jsmin implementations
|
||||
=================================
|
||||
|
||||
Benchmark jsmin implementations.
|
||||
|
||||
:Copyright:
|
||||
|
||||
Copyright 2011 - 2014
|
||||
Andr\xe9 Malo or his licensors, as applicable
|
||||
|
||||
:License:
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
"""
|
||||
if __doc__:
|
||||
__doc__ = __doc__.encode('ascii').decode('unicode_escape')
|
@ -1,6 +1,12 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: ascii -*-
|
||||
r"""
|
||||
=================================
|
||||
Benchmark jsmin implementations
|
||||
=================================
|
||||
|
||||
Benchmark jsmin implementations.
|
||||
|
||||
:Copyright:
|
||||
|
||||
Copyright 2011 - 2014
|
||||
@ -20,17 +26,12 @@ r"""
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=================================
|
||||
Benchmark jsmin implementations
|
||||
=================================
|
||||
|
||||
Benchmark jsmin implementations.
|
||||
|
||||
Usage::
|
||||
|
||||
bench.py [-c COUNT] jsfile ...
|
||||
python -mbench.main [-c COUNT] [-p file] jsfile ...
|
||||
|
||||
-c COUNT number of runs per jsfile and minifier. Defaults to 10.
|
||||
-p file File to write the benchmark results in (pickled)
|
||||
|
||||
"""
|
||||
if __doc__:
|
||||
@ -43,18 +44,21 @@ __version__ = "1.0.0"
|
||||
import sys as _sys
|
||||
import time as _time
|
||||
|
||||
import_notes = []
|
||||
class jsmins(object):
|
||||
from bench import jsmin as p_01_simple_port
|
||||
if _sys.version_info >= (2, 4):
|
||||
from bench import jsmin_2_0_9 as p_02_jsmin_2_0_9
|
||||
else:
|
||||
print("jsmin_2_0_9 available for python 2.4 and later...")
|
||||
import_notes.append(
|
||||
"jsmin_2_0_9 available for python 2.4 and later..."
|
||||
)
|
||||
print(import_notes[-1])
|
||||
try:
|
||||
import slimit as _slimit_0_8_1
|
||||
except ImportError:
|
||||
print("slimit_0_8_1 not installed for python %d.%d..." %
|
||||
_sys.version_info[:2]
|
||||
)
|
||||
except (ImportError, SyntaxError):
|
||||
import_notes.append("slimit_0_8_1 could not be imported")
|
||||
print(import_notes[-1])
|
||||
else:
|
||||
class p_03_slimit_0_8_1(object):
|
||||
pass
|
||||
@ -70,7 +74,8 @@ class jsmins(object):
|
||||
try:
|
||||
import _rjsmin as p_06__rjsmin
|
||||
except ImportError:
|
||||
print("_rjsmin (C-Port) not available")
|
||||
import_notes.append("_rjsmin (C-Port) not available")
|
||||
print(import_notes[-1])
|
||||
jsmins.p_05_rjsmin.jsmin = jsmins.p_05_rjsmin._make_jsmin(
|
||||
python_only=True
|
||||
)
|
||||
@ -125,6 +130,7 @@ def bench(filenames, count):
|
||||
ports = [(item[5:], getattr(jsmins, item).jsmin) for item in ports]
|
||||
flush = _sys.stdout.flush
|
||||
|
||||
struct = []
|
||||
inputs = [(filename, slurp(filename)) for filename in filenames]
|
||||
for filename, script in inputs:
|
||||
print_("Benchmarking %r..." % filename, end=" ")
|
||||
@ -137,12 +143,22 @@ def bench(filenames, count):
|
||||
raise
|
||||
except:
|
||||
outputs.append(None)
|
||||
print_("(%.1f KiB)" % (len(script) / 1024.0))
|
||||
struct.append(dict(
|
||||
filename=filename,
|
||||
sizes=[
|
||||
(item is not None and len(item) or None) for item in outputs
|
||||
],
|
||||
size=len(script),
|
||||
messages=[],
|
||||
times=[],
|
||||
))
|
||||
print_("(%.1f KiB)" % (struct[-1]['size'] / 1024.0,))
|
||||
flush()
|
||||
times = []
|
||||
for idx, (name, jsmin) in enumerate(ports):
|
||||
if outputs[idx] is None:
|
||||
print_(" FAILED %s" % (name,))
|
||||
struct[-1]['times'].append((name, None))
|
||||
else:
|
||||
print_(" Timing %s%s... (%5.1f KiB %s)" % (
|
||||
name,
|
||||
@ -176,20 +192,58 @@ def bench(filenames, count):
|
||||
print_("(factor: %s)" % (', '.join([
|
||||
'%.2f' % (timed / times[-1]) for timed in times[:-1]
|
||||
])))
|
||||
struct[-1]['times'].append((name, times[-1]))
|
||||
|
||||
flush()
|
||||
print_()
|
||||
|
||||
return struct
|
||||
|
||||
def main(argv):
|
||||
|
||||
def main(argv=None):
|
||||
""" Main """
|
||||
count, idx = 10, 0
|
||||
if argv and argv[0] == '-c':
|
||||
count, idx = int(argv[1]), 2
|
||||
elif argv and argv[0].startswith('-c'):
|
||||
count, idx = int(argv[0][2:]), 1
|
||||
bench(argv[idx:], count)
|
||||
import getopt as _getopt
|
||||
import os as _os
|
||||
import pickle as _pickle
|
||||
|
||||
if argv is None:
|
||||
argv = _sys.argv[1:]
|
||||
try:
|
||||
opts, args = _getopt.getopt(argv, "hc:p:", ["help"])
|
||||
except getopt.GetoptError:
|
||||
e = _sys.exc_info()[0](_sys.exc_info()[1])
|
||||
print >> _sys.stderr, "%s\nTry %s -mbench.main --help" % (
|
||||
e,
|
||||
_os.path.basename(_sys.executable),
|
||||
)
|
||||
_sys.exit(2)
|
||||
|
||||
count, pickle = 10, None
|
||||
for key, value in opts:
|
||||
if key in ("-h", "--help"):
|
||||
print >> _sys.stderr, (
|
||||
"%s -mbench.main [-c count] [-p file] cssfile ..." % (
|
||||
_os.path.basename(_sys.executable),
|
||||
)
|
||||
)
|
||||
_sys.exit(0)
|
||||
elif key == '-c':
|
||||
count = int(value)
|
||||
elif key == '-p':
|
||||
pickle = str(value)
|
||||
|
||||
struct = bench(args, count)
|
||||
if pickle:
|
||||
fp = open(pickle, 'wb')
|
||||
try:
|
||||
fp.write(_pickle.dumps((
|
||||
".".join(map(str, _sys.version_info[:3])),
|
||||
import_notes,
|
||||
struct,
|
||||
), 0))
|
||||
finally:
|
||||
fp.close()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(_sys.argv[1:])
|
||||
main()
|
171
bench/write.py
Normal file
171
bench/write.py
Normal file
@ -0,0 +1,171 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: ascii -*-
|
||||
r"""
|
||||
=========================
|
||||
Write benchmark results
|
||||
=========================
|
||||
|
||||
Write benchmark results.
|
||||
|
||||
:Copyright:
|
||||
|
||||
Copyright 2014
|
||||
Andr\xe9 Malo or his licensors, as applicable
|
||||
|
||||
:License:
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Usage::
|
||||
|
||||
python -mbench.write -p plain-file <pickled
|
||||
|
||||
-p plain-file Plain file to write to (like docs/BENCHAMRKS).
|
||||
|
||||
"""
|
||||
if __doc__:
|
||||
__doc__ = __doc__.encode('ascii').decode('unicode_escape')
|
||||
__author__ = r"Andr\xe9 Malo".encode('ascii').decode('unicode_escape')
|
||||
__docformat__ = "restructuredtext en"
|
||||
__license__ = "Apache License, Version 2.0"
|
||||
__version__ = "1.0.0"
|
||||
|
||||
import sys as _sys
|
||||
|
||||
|
||||
def write_plain(filename, results):
|
||||
"""
|
||||
Output plain benchmark results
|
||||
|
||||
:Parameters:
|
||||
`filename` : ``str``
|
||||
Filename to write to
|
||||
|
||||
`results` : ``list``
|
||||
Results
|
||||
"""
|
||||
try:
|
||||
unicode
|
||||
except NameError:
|
||||
def uni(v):
|
||||
if hasattr(v, 'decode'):
|
||||
return v.decode('latin-1')
|
||||
return str(v)
|
||||
else:
|
||||
def uni(v):
|
||||
if isinstance(v, unicode):
|
||||
return v.encode('utf-8')
|
||||
return str(v)
|
||||
|
||||
lines = []
|
||||
results = sorted(results, reverse=True)
|
||||
for idx, (version, import_notes, result) in enumerate(results):
|
||||
if idx:
|
||||
lines.append('')
|
||||
lines.append('')
|
||||
|
||||
lines.append('$ python%s -OO bench/main.py bench/*.js' % (
|
||||
'.'.join(version.split('.')[:2])
|
||||
))
|
||||
lines.append('~' * 72)
|
||||
for note in import_notes:
|
||||
lines.append(uni(note))
|
||||
lines.append('Python Release: %s' % (version,))
|
||||
|
||||
for single in result:
|
||||
lines.append('')
|
||||
lines.append('Benchmarking %r... (%.1f KiB)' % (
|
||||
uni(single['filename']), single['size'] / 1024.0
|
||||
))
|
||||
for msg in single['messages']:
|
||||
lines.append(msg)
|
||||
times = []
|
||||
space = max([len(uni(port)) for port, _ in single['times']])
|
||||
for idx, (port, time) in enumerate(single['times']):
|
||||
port = uni(port)
|
||||
if time is None:
|
||||
lines.append(" FAILED %s" % (port,))
|
||||
else:
|
||||
times.append(time)
|
||||
lines.append(
|
||||
" Timing %s%s ... (%5.1f KiB %s) %8.2f ms" % (
|
||||
port,
|
||||
" " * (space - len(port)),
|
||||
single['sizes'][idx] / 1024.0,
|
||||
idx == 0 and '*' or ['=', '>', '<'][
|
||||
cmp(single['sizes'][idx], single['sizes'][0])
|
||||
],
|
||||
time
|
||||
)
|
||||
)
|
||||
if len(times) > 1:
|
||||
lines[-1] += " (factor: %s)" % (', '.join([
|
||||
'%.2f' % (timed / time) for timed in times[:-1]
|
||||
]))
|
||||
|
||||
lines.append('')
|
||||
lines.append('')
|
||||
lines.append('# vim: nowrap')
|
||||
fp = open(filename, 'w')
|
||||
try:
|
||||
fp.write('\n'.join(lines) + '\n')
|
||||
finally:
|
||||
fp.close()
|
||||
|
||||
|
||||
def main(argv=None):
|
||||
""" Main """
|
||||
import getopt as _getopt
|
||||
import os as _os
|
||||
import pickle as _pickle
|
||||
|
||||
if argv is None:
|
||||
argv = _sys.argv[1:]
|
||||
try:
|
||||
opts, args = _getopt.getopt(argv, "hp:", ["help"])
|
||||
except getopt.GetoptError:
|
||||
e = _sys.exc_info()[0](_sys.exc_info()[1])
|
||||
print >> _sys.stderr, "%s\nTry %s -mbench.write --help" % (
|
||||
e,
|
||||
_os.path.basename(_sys.executable),
|
||||
)
|
||||
_sys.exit(2)
|
||||
|
||||
plain = None
|
||||
for key, value in opts:
|
||||
if key in ("-h", "--help"):
|
||||
print >> _sys.stderr, (
|
||||
"%s -mbench.write [-p plain-file] <pickled" % (
|
||||
_os.path.basename(_sys.executable),
|
||||
)
|
||||
)
|
||||
_sys.exit(0)
|
||||
elif key == '-p':
|
||||
plain = str(value)
|
||||
|
||||
struct = []
|
||||
try:
|
||||
while True:
|
||||
version, import_notes, result = _pickle.load(_sys.stdin)
|
||||
if hasattr(version, 'decode'):
|
||||
version = version.decode('latin-1')
|
||||
struct.append((version, import_notes, result))
|
||||
except EOFError:
|
||||
pass
|
||||
|
||||
if plain:
|
||||
write_plain(plain, struct)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
435
docs/BENCHMARKS
435
docs/BENCHMARKS
@ -1,217 +1,388 @@
|
||||
$ python3.4 -OO bench.py bench/*.js
|
||||
$ python3.4 -OO bench/main.py bench/*.js
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
slimit_0_8_1 not installed for python 3.4...
|
||||
Python Release: 3.4.0
|
||||
|
||||
Benchmarking 'bench/apiviewer.js'... (953.2 KiB)
|
||||
Timing simple_port ... (951.5 KiB *) 2162.57 ms
|
||||
Timing jsmin_2_0_9 ... (951.5 KiB >) 2526.19 ms (factor: 0.86)
|
||||
Timing rjsmin ... (951.5 KiB =) 57.31 ms (factor: 37.73, 44.08)
|
||||
Timing _rjsmin ... (951.5 KiB =) 2.20 ms (factor: 982.81, 1148.06, 26.05)
|
||||
Timing simple_port ... (951.5 KiB *) 2083.14 ms
|
||||
Timing jsmin_2_0_9 ... (951.5 KiB >) 2439.38 ms (factor: 0.85)
|
||||
FAILED slimit_0_8_1
|
||||
FAILED slimit_0_8_1_mangle
|
||||
Timing rjsmin ... (951.5 KiB =) 56.03 ms (factor: 37.18, 43.54)
|
||||
Timing _rjsmin ... (951.5 KiB =) 2.11 ms (factor: 987.34, 1156.19, 26.56)
|
||||
|
||||
Benchmarking 'bench/bootstrap.js'... (49.0 KiB)
|
||||
Timing simple_port ... ( 26.4 KiB *) 90.56 ms
|
||||
Timing jsmin_2_0_9 ... ( 26.4 KiB >) 39.41 ms (factor: 2.30)
|
||||
Timing rjsmin ... ( 26.4 KiB >) 14.05 ms (factor: 6.45, 2.80)
|
||||
Timing _rjsmin ... ( 26.4 KiB >) 0.17 ms (factor: 526.87, 229.27, 81.75)
|
||||
Timing simple_port ... ( 26.4 KiB *) 90.13 ms
|
||||
Timing jsmin_2_0_9 ... ( 26.4 KiB >) 38.70 ms (factor: 2.33)
|
||||
FAILED slimit_0_8_1
|
||||
FAILED slimit_0_8_1_mangle
|
||||
Timing rjsmin ... ( 26.4 KiB >) 13.78 ms (factor: 6.54, 2.81)
|
||||
Timing _rjsmin ... ( 26.4 KiB >) 0.17 ms (factor: 526.72, 226.19, 80.51)
|
||||
|
||||
Benchmarking 'bench/jquery-1.7.1.js'... (242.4 KiB)
|
||||
Timing simple_port ... (135.9 KiB *) 474.08 ms
|
||||
Timing jsmin_2_0_9 ... (136.8 KiB >) 253.22 ms (factor: 1.87)
|
||||
Timing rjsmin ... (135.9 KiB =) 96.61 ms (factor: 4.91, 2.62)
|
||||
Timing _rjsmin ... (135.9 KiB =) 1.13 ms (factor: 418.93, 223.76, 85.37)
|
||||
Timing simple_port ... (135.9 KiB *) 468.94 ms
|
||||
Timing jsmin_2_0_9 ... (136.8 KiB >) 251.12 ms (factor: 1.87)
|
||||
FAILED slimit_0_8_1
|
||||
FAILED slimit_0_8_1_mangle
|
||||
Timing rjsmin ... (135.9 KiB =) 95.54 ms (factor: 4.91, 2.63)
|
||||
Timing _rjsmin ... (135.9 KiB =) 1.12 ms (factor: 420.55, 225.20, 85.68)
|
||||
|
||||
Benchmarking 'bench/knockout-2.0.0.js'... (38.9 KiB)
|
||||
Timing simple_port ... ( 38.6 KiB *) 84.49 ms
|
||||
Timing jsmin_2_0_9 ... ( 38.6 KiB >) 43.57 ms (factor: 1.94)
|
||||
Timing rjsmin ... ( 38.6 KiB >) 2.92 ms (factor: 28.95, 14.93)
|
||||
Timing _rjsmin ... ( 38.6 KiB >) 0.09 ms (factor: 897.40, 462.81, 30.99)
|
||||
Timing simple_port ... ( 38.6 KiB *) 83.92 ms
|
||||
Timing jsmin_2_0_9 ... ( 38.6 KiB >) 42.35 ms (factor: 1.98)
|
||||
FAILED slimit_0_8_1
|
||||
FAILED slimit_0_8_1_mangle
|
||||
Timing rjsmin ... ( 38.6 KiB >) 2.87 ms (factor: 29.21, 14.74)
|
||||
Timing _rjsmin ... ( 38.6 KiB >) 0.09 ms (factor: 895.82, 452.10, 30.66)
|
||||
|
||||
Benchmarking 'bench/markermanager.js'... (28.6 KiB)
|
||||
Timing simple_port ... ( 11.6 KiB *) 45.54 ms
|
||||
Timing jsmin_2_0_9 ... ( 11.6 KiB >) 19.94 ms (factor: 2.28)
|
||||
Timing rjsmin ... ( 11.6 KiB =) 5.97 ms (factor: 7.63, 3.34)
|
||||
Timing _rjsmin ... ( 11.6 KiB =) 0.08 ms (factor: 571.39, 250.22, 74.87)
|
||||
Timing simple_port ... ( 11.6 KiB *) 44.58 ms
|
||||
Timing jsmin_2_0_9 ... ( 11.6 KiB >) 19.18 ms (factor: 2.32)
|
||||
Timing slimit_0_8_1 ... ( 11.5 KiB <) 149.82 ms (factor: 0.30, 0.13)
|
||||
Timing slimit_0_8_1_mangle ... ( 9.3 KiB <) 174.04 ms (factor: 0.26, 0.11, 0.86)
|
||||
Timing rjsmin ... ( 11.6 KiB =) 5.88 ms (factor: 7.59, 3.26, 25.50, 29.62)
|
||||
Timing _rjsmin ... ( 11.6 KiB =) 0.08 ms (factor: 565.73, 243.38, 1901.13, 2208.49, 74.56)
|
||||
|
||||
|
||||
$ python3.3 -OO bench.py bench/*.js
|
||||
$ python3.3 -OO bench/main.py bench/*.js
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Python Release: 3.3.3
|
||||
|
||||
Benchmarking 'bench/apiviewer.js'... (953.2 KiB)
|
||||
Timing simple_port ... (951.5 KiB *) 2720.49 ms
|
||||
Timing jsmin_2_0_9 ... (951.5 KiB >) 2736.73 ms (factor: 0.99)
|
||||
Timing simple_port ... (951.5 KiB *) 2805.14 ms
|
||||
Timing jsmin_2_0_9 ... (951.5 KiB >) 2741.73 ms (factor: 1.02)
|
||||
FAILED slimit_0_8_1
|
||||
FAILED slimit_0_8_1_mangle
|
||||
Timing rjsmin ... (951.5 KiB =) 78.08 ms (factor: 34.84, 35.05)
|
||||
Timing _rjsmin ... (951.5 KiB =) 2.34 ms (factor: 1164.02, 1170.97, 33.41)
|
||||
Timing rjsmin ... (951.5 KiB =) 75.86 ms (factor: 36.98, 36.14)
|
||||
Timing _rjsmin ... (951.5 KiB =) 2.14 ms (factor: 1309.39, 1279.78, 35.41)
|
||||
|
||||
Benchmarking 'bench/bootstrap.js'... (49.0 KiB)
|
||||
Timing simple_port ... ( 26.4 KiB *) 114.06 ms
|
||||
Timing jsmin_2_0_9 ... ( 26.4 KiB >) 50.09 ms (factor: 2.28)
|
||||
Timing simple_port ... ( 26.4 KiB *) 112.96 ms
|
||||
Timing jsmin_2_0_9 ... ( 26.4 KiB >) 48.69 ms (factor: 2.32)
|
||||
FAILED slimit_0_8_1
|
||||
FAILED slimit_0_8_1_mangle
|
||||
Timing rjsmin ... ( 26.4 KiB >) 19.33 ms (factor: 5.90, 2.59)
|
||||
Timing _rjsmin ... ( 26.4 KiB >) 0.20 ms (factor: 584.28, 256.58, 99.04)
|
||||
Timing rjsmin ... ( 26.4 KiB >) 18.50 ms (factor: 6.11, 2.63)
|
||||
Timing _rjsmin ... ( 26.4 KiB >) 0.18 ms (factor: 629.94, 271.54, 103.15)
|
||||
|
||||
Benchmarking 'bench/jquery-1.7.1.js'... (242.4 KiB)
|
||||
Timing simple_port ... (135.9 KiB *) 596.73 ms
|
||||
Timing jsmin_2_0_9 ... (136.8 KiB >) 308.43 ms (factor: 1.93)
|
||||
Timing simple_port ... (135.9 KiB *) 596.73 ms
|
||||
Timing jsmin_2_0_9 ... (136.8 KiB >) 309.95 ms (factor: 1.93)
|
||||
FAILED slimit_0_8_1
|
||||
FAILED slimit_0_8_1_mangle
|
||||
Timing rjsmin ... (135.9 KiB =) 135.33 ms (factor: 4.41, 2.28)
|
||||
Timing _rjsmin ... (135.9 KiB =) 1.29 ms (factor: 462.88, 239.24, 104.98)
|
||||
Timing rjsmin ... (135.9 KiB =) 127.05 ms (factor: 4.70, 2.44)
|
||||
Timing _rjsmin ... (135.9 KiB =) 1.14 ms (factor: 524.99, 272.68, 111.77)
|
||||
|
||||
Benchmarking 'bench/knockout-2.0.0.js'... (38.9 KiB)
|
||||
Timing simple_port ... ( 38.6 KiB *) 111.25 ms
|
||||
Timing jsmin_2_0_9 ... ( 38.6 KiB >) 53.33 ms (factor: 2.09)
|
||||
Timing simple_port ... ( 38.6 KiB *) 110.93 ms
|
||||
Timing jsmin_2_0_9 ... ( 38.6 KiB >) 50.83 ms (factor: 2.18)
|
||||
FAILED slimit_0_8_1
|
||||
FAILED slimit_0_8_1_mangle
|
||||
Timing rjsmin ... ( 38.6 KiB >) 4.40 ms (factor: 25.27, 12.11)
|
||||
Timing _rjsmin ... ( 38.6 KiB >) 0.11 ms (factor: 1024.05, 490.94, 40.53)
|
||||
Timing rjsmin ... ( 38.6 KiB >) 4.20 ms (factor: 26.40, 12.10)
|
||||
Timing _rjsmin ... ( 38.6 KiB >) 0.10 ms (factor: 1131.98, 518.66, 42.88)
|
||||
|
||||
Benchmarking 'bench/markermanager.js'... (28.6 KiB)
|
||||
Timing simple_port ... ( 11.6 KiB *) 56.83 ms
|
||||
Timing jsmin_2_0_9 ... ( 11.6 KiB >) 25.13 ms (factor: 2.26)
|
||||
Timing slimit_0_8_1 ... ( 11.5 KiB <) 162.14 ms (factor: 0.35, 0.15)
|
||||
Timing slimit_0_8_1_mangle ... ( 9.3 KiB <) 192.01 ms (factor: 0.30, 0.13, 0.84)
|
||||
Timing rjsmin ... ( 11.6 KiB =) 8.75 ms (factor: 6.50, 2.87, 18.54, 21.95)
|
||||
Timing _rjsmin ... ( 11.6 KiB =) 0.08 ms (factor: 684.11, 302.46, 1951.85, 2311.53, 105.29)
|
||||
Timing simple_port ... ( 11.6 KiB *) 56.39 ms
|
||||
Timing jsmin_2_0_9 ... ( 11.6 KiB >) 24.10 ms (factor: 2.34)
|
||||
Timing slimit_0_8_1 ... ( 11.5 KiB <) 159.78 ms (factor: 0.35, 0.15)
|
||||
Timing slimit_0_8_1_mangle ... ( 9.3 KiB <) 186.04 ms (factor: 0.30, 0.13, 0.86)
|
||||
Timing rjsmin ... ( 11.6 KiB =) 8.30 ms (factor: 6.80, 2.90, 19.26, 22.42)
|
||||
Timing _rjsmin ... ( 11.6 KiB =) 0.08 ms (factor: 684.74, 292.67, 1940.24, 2259.20, 100.76)
|
||||
|
||||
|
||||
$ python3.2 -OO bench.py bench/*.js
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
$ python3.2 -OO bench/main.py bench/*.js
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Python Release: 3.2.5
|
||||
|
||||
Benchmarking 'bench/apiviewer.js'... (953.2 KiB)
|
||||
Timing simple_port ... (951.5 KiB *) 2377.65 ms
|
||||
Timing jsmin_2_0_9 ... (951.5 KiB >) 9489.33 ms (factor: 0.25)
|
||||
Timing simple_port ... (951.5 KiB *) 2372.53 ms
|
||||
Timing jsmin_2_0_9 ... (951.5 KiB >) 8911.83 ms (factor: 0.27)
|
||||
FAILED slimit_0_8_1
|
||||
FAILED slimit_0_8_1_mangle
|
||||
Timing rjsmin ... (951.5 KiB =) 65.24 ms (factor: 36.45, 145.46)
|
||||
Timing _rjsmin ... (951.5 KiB =) 1.99 ms (factor: 1195.53, 4771.40, 32.80)
|
||||
Timing rjsmin ... (951.5 KiB =) 68.91 ms (factor: 34.43, 129.32)
|
||||
Timing _rjsmin ... (951.5 KiB =) 1.96 ms (factor: 1208.26, 4538.54, 35.10)
|
||||
|
||||
Benchmarking 'bench/bootstrap.js'... (49.0 KiB)
|
||||
Timing simple_port ... ( 26.4 KiB *) 98.02 ms
|
||||
Timing jsmin_2_0_9 ... ( 26.4 KiB >) 45.45 ms (factor: 2.16)
|
||||
Timing simple_port ... ( 26.4 KiB *) 97.80 ms
|
||||
Timing jsmin_2_0_9 ... ( 26.4 KiB >) 44.32 ms (factor: 2.21)
|
||||
FAILED slimit_0_8_1
|
||||
FAILED slimit_0_8_1_mangle
|
||||
Timing rjsmin ... ( 26.4 KiB >) 16.77 ms (factor: 5.85, 2.71)
|
||||
Timing _rjsmin ... ( 26.4 KiB >) 0.17 ms (factor: 560.35, 259.84, 95.86)
|
||||
Timing rjsmin ... ( 26.4 KiB >) 17.00 ms (factor: 5.75, 2.61)
|
||||
Timing _rjsmin ... ( 26.4 KiB >) 0.17 ms (factor: 561.85, 254.60, 97.65)
|
||||
|
||||
Benchmarking 'bench/jquery-1.7.1.js'... (242.4 KiB)
|
||||
Timing simple_port ... (135.9 KiB *) 518.78 ms
|
||||
Timing jsmin_2_0_9 ... (136.8 KiB >) 419.87 ms (factor: 1.24)
|
||||
Timing simple_port ... (135.9 KiB *) 517.50 ms
|
||||
Timing jsmin_2_0_9 ... (136.8 KiB >) 411.85 ms (factor: 1.26)
|
||||
FAILED slimit_0_8_1
|
||||
FAILED slimit_0_8_1_mangle
|
||||
Timing rjsmin ... (135.9 KiB =) 114.76 ms (factor: 4.52, 3.66)
|
||||
Timing _rjsmin ... (135.9 KiB =) 1.14 ms (factor: 453.71, 367.21, 100.36)
|
||||
Timing rjsmin ... (135.9 KiB =) 117.36 ms (factor: 4.41, 3.51)
|
||||
Timing _rjsmin ... (135.9 KiB =) 1.11 ms (factor: 464.76, 369.88, 105.40)
|
||||
|
||||
Benchmarking 'bench/knockout-2.0.0.js'... (38.9 KiB)
|
||||
Timing simple_port ... ( 38.6 KiB *) 94.44 ms
|
||||
Timing jsmin_2_0_9 ... ( 38.6 KiB >) 49.24 ms (factor: 1.92)
|
||||
Timing simple_port ... ( 38.6 KiB *) 95.02 ms
|
||||
Timing jsmin_2_0_9 ... ( 38.6 KiB >) 48.91 ms (factor: 1.94)
|
||||
FAILED slimit_0_8_1
|
||||
FAILED slimit_0_8_1_mangle
|
||||
Timing rjsmin ... ( 38.6 KiB >) 3.70 ms (factor: 25.55, 13.32)
|
||||
Timing _rjsmin ... ( 38.6 KiB >) 0.09 ms (factor: 1070.64, 558.28, 41.90)
|
||||
Timing rjsmin ... ( 38.6 KiB >) 3.85 ms (factor: 24.69, 12.71)
|
||||
Timing _rjsmin ... ( 38.6 KiB >) 0.09 ms (factor: 1088.37, 560.23, 44.08)
|
||||
|
||||
Benchmarking 'bench/markermanager.js'... (28.6 KiB)
|
||||
Timing simple_port ... ( 11.6 KiB *) 48.41 ms
|
||||
Timing jsmin_2_0_9 ... ( 11.6 KiB >) 21.42 ms (factor: 2.26)
|
||||
Timing slimit_0_8_1 ... ( 11.5 KiB <) 152.92 ms (factor: 0.32, 0.14)
|
||||
Timing slimit_0_8_1_mangle ... ( 9.3 KiB <) 183.88 ms (factor: 0.26, 0.12, 0.83)
|
||||
Timing rjsmin ... ( 11.6 KiB =) 7.26 ms (factor: 6.67, 2.95, 21.06, 25.32)
|
||||
Timing _rjsmin ... ( 11.6 KiB =) 0.08 ms (factor: 608.13, 269.06, 1921.19, 2310.08, 91.24)
|
||||
Timing simple_port ... ( 11.6 KiB *) 48.13 ms
|
||||
Timing jsmin_2_0_9 ... ( 11.6 KiB >) 20.64 ms (factor: 2.33)
|
||||
Timing slimit_0_8_1 ... ( 11.5 KiB <) 150.11 ms (factor: 0.32, 0.14)
|
||||
Timing slimit_0_8_1_mangle ... ( 9.3 KiB <) 177.11 ms (factor: 0.27, 0.12, 0.85)
|
||||
Timing rjsmin ... ( 11.6 KiB =) 7.37 ms (factor: 6.53, 2.80, 20.35, 24.02)
|
||||
Timing _rjsmin ... ( 11.6 KiB =) 0.08 ms (factor: 606.20, 259.99, 1890.49, 2230.53, 92.88)
|
||||
|
||||
|
||||
$ python2.7 -OO bench.py bench/*.js
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
$ python3.1 -OO bench/main.py bench/*.js
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Python Release: 3.1.5
|
||||
|
||||
Benchmarking 'bench/apiviewer.js'... (953.2 KiB)
|
||||
Timing simple_port ... (951.5 KiB *) 2418.96 ms
|
||||
Timing jsmin_2_0_9 ... (951.5 KiB >) 4455.01 ms (factor: 0.54)
|
||||
FAILED slimit_0_8_1
|
||||
FAILED slimit_0_8_1_mangle
|
||||
Timing rjsmin ... (951.5 KiB =) 61.65 ms (factor: 39.24, 72.26)
|
||||
Timing _rjsmin ... (951.5 KiB =) 1.89 ms (factor: 1277.38, 2352.56, 32.56)
|
||||
|
||||
Benchmarking 'bench/bootstrap.js'... (49.0 KiB)
|
||||
Timing simple_port ... ( 26.4 KiB *) 102.87 ms
|
||||
Timing jsmin_2_0_9 ... ( 26.4 KiB >) 50.26 ms (factor: 2.05)
|
||||
FAILED slimit_0_8_1
|
||||
FAILED slimit_0_8_1_mangle
|
||||
Timing rjsmin ... ( 26.4 KiB >) 15.10 ms (factor: 6.81, 3.33)
|
||||
Timing _rjsmin ... ( 26.4 KiB >) 0.18 ms (factor: 583.83, 285.25, 85.68)
|
||||
|
||||
Benchmarking 'bench/jquery-1.7.1.js'... (242.4 KiB)
|
||||
Timing simple_port ... (135.9 KiB *) 540.63 ms
|
||||
Timing jsmin_2_0_9 ... (136.8 KiB >) 349.77 ms (factor: 1.55)
|
||||
FAILED slimit_0_8_1
|
||||
FAILED slimit_0_8_1_mangle
|
||||
Timing rjsmin ... (135.9 KiB =) 105.46 ms (factor: 5.13, 3.32)
|
||||
Timing _rjsmin ... (135.9 KiB =) 1.09 ms (factor: 494.63, 320.01, 96.49)
|
||||
|
||||
Benchmarking 'bench/knockout-2.0.0.js'... (38.9 KiB)
|
||||
Timing simple_port ... ( 38.6 KiB *) 96.75 ms
|
||||
Timing jsmin_2_0_9 ... ( 38.6 KiB >) 53.25 ms (factor: 1.82)
|
||||
FAILED slimit_0_8_1
|
||||
FAILED slimit_0_8_1_mangle
|
||||
Timing rjsmin ... ( 38.6 KiB >) 3.43 ms (factor: 28.22, 15.53)
|
||||
Timing _rjsmin ... ( 38.6 KiB >) 0.09 ms (factor: 1096.85, 603.67, 38.86)
|
||||
|
||||
Benchmarking 'bench/markermanager.js'... (28.6 KiB)
|
||||
Timing simple_port ... ( 11.6 KiB *) 50.98 ms
|
||||
Timing jsmin_2_0_9 ... ( 11.6 KiB >) 26.19 ms (factor: 1.95)
|
||||
Timing slimit_0_8_1 ... ( 11.5 KiB <) 137.84 ms (factor: 0.37, 0.19)
|
||||
Timing slimit_0_8_1_mangle ... ( 9.3 KiB <) 159.43 ms (factor: 0.32, 0.16, 0.86)
|
||||
Timing rjsmin ... ( 11.6 KiB =) 6.47 ms (factor: 7.88, 4.05, 21.29, 24.63)
|
||||
Timing _rjsmin ... ( 11.6 KiB =) 0.08 ms (factor: 659.94, 338.97, 1784.33, 2063.88, 83.80)
|
||||
|
||||
|
||||
$ python3.0 -OO bench/main.py bench/*.js
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
slimit_0_8_1 not installed for python 3.0...
|
||||
Python Release: 3.0.1
|
||||
|
||||
Benchmarking 'bench/apiviewer.js'... (953.2 KiB)
|
||||
Timing simple_port ... (951.5 KiB *) 6725.57 ms
|
||||
Timing jsmin_2_0_9 ... (951.5 KiB >) 8824.69 ms (factor: 0.76)
|
||||
Timing rjsmin ... (951.5 KiB =) 60.97 ms (factor: 110.31, 144.74)
|
||||
Timing _rjsmin ... (951.5 KiB =) 1.93 ms (factor: 3489.97, 4579.23, 31.64)
|
||||
|
||||
Benchmarking 'bench/bootstrap.js'... (49.0 KiB)
|
||||
Timing simple_port ... ( 26.4 KiB *) 294.93 ms
|
||||
Timing jsmin_2_0_9 ... ( 26.4 KiB >) 238.16 ms (factor: 1.24)
|
||||
Timing rjsmin ... ( 26.4 KiB >) 15.68 ms (factor: 18.81, 15.19)
|
||||
Timing _rjsmin ... ( 26.4 KiB >) 0.17 ms (factor: 1767.00, 1426.89, 93.93)
|
||||
|
||||
Benchmarking 'bench/jquery-1.7.1.js'... (242.4 KiB)
|
||||
Timing simple_port ... (135.9 KiB *) 1495.38 ms
|
||||
Timing jsmin_2_0_9 ... (136.8 KiB >) 1315.18 ms (factor: 1.14)
|
||||
Timing rjsmin ... (135.9 KiB =) 108.75 ms (factor: 13.75, 12.09)
|
||||
Timing _rjsmin ... (135.9 KiB =) 1.08 ms (factor: 1381.18, 1214.74, 100.44)
|
||||
|
||||
Benchmarking 'bench/knockout-2.0.0.js'... (38.9 KiB)
|
||||
Timing simple_port ... ( 38.6 KiB *) 273.43 ms
|
||||
Timing jsmin_2_0_9 ... ( 38.6 KiB >) 223.27 ms (factor: 1.22)
|
||||
Timing rjsmin ... ( 38.6 KiB >) 3.40 ms (factor: 80.39, 65.64)
|
||||
Timing _rjsmin ... ( 38.6 KiB >) 0.09 ms (factor: 3093.63, 2526.05, 38.48)
|
||||
|
||||
Benchmarking 'bench/markermanager.js'... (28.6 KiB)
|
||||
Timing simple_port ... ( 11.6 KiB *) 157.33 ms
|
||||
Timing jsmin_2_0_9 ... ( 11.6 KiB >) 130.73 ms (factor: 1.20)
|
||||
Timing rjsmin ... ( 11.6 KiB =) 6.71 ms (factor: 23.44, 19.47)
|
||||
Timing _rjsmin ... ( 11.6 KiB =) 0.08 ms (factor: 2046.53, 1700.44, 87.32)
|
||||
|
||||
|
||||
$ python2.7 -OO bench/main.py bench/*.js
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Python Release: 2.7.5
|
||||
|
||||
Benchmarking 'bench/apiviewer.js'... (953.2 KiB)
|
||||
Timing simple_port ... (951.5 KiB *) 2905.73 ms
|
||||
Timing jsmin_2_0_9 ... (951.5 KiB >) 2996.74 ms (factor: 0.97)
|
||||
Timing slimit_0_8_1 ... (944.3 KiB <) 13816.28 ms (factor: 0.21, 0.22)
|
||||
Timing slimit_0_8_1_mangle ... (922.9 KiB <) 16937.11 ms (factor: 0.17, 0.18, 0.82)
|
||||
Timing rjsmin ... (951.5 KiB =) 60.79 ms (factor: 47.80, 49.29, 227.27, 278.61)
|
||||
Timing _rjsmin ... (951.5 KiB =) 2.01 ms (factor: 1447.88, 1493.23, 6884.43, 8439.49, 30.29)
|
||||
Timing simple_port ... (951.5 KiB *) 2960.91 ms
|
||||
Timing jsmin_2_0_9 ... (951.5 KiB >) 3087.26 ms (factor: 0.96)
|
||||
Timing slimit_0_8_1 ... (944.3 KiB <) 13520.48 ms (factor: 0.22, 0.23)
|
||||
Timing slimit_0_8_1_mangle ... (922.9 KiB <) 16463.29 ms (factor: 0.18, 0.19, 0.82)
|
||||
Timing rjsmin ... (951.5 KiB =) 60.45 ms (factor: 48.98, 51.07, 223.66, 272.35)
|
||||
Timing _rjsmin ... (951.5 KiB =) 1.92 ms (factor: 1544.14, 1610.04, 7051.08, 8585.79, 31.53)
|
||||
|
||||
Benchmarking 'bench/bootstrap.js'... (49.0 KiB)
|
||||
Timing simple_port ... ( 26.4 KiB *) 117.53 ms
|
||||
Timing jsmin_2_0_9 ... ( 26.4 KiB >) 59.87 ms (factor: 1.96)
|
||||
Timing slimit_0_8_1 ... ( 26.5 KiB >) 390.69 ms (factor: 0.30, 0.15)
|
||||
Timing slimit_0_8_1_mangle ... ( 22.2 KiB <) 415.09 ms (factor: 0.28, 0.14, 0.94)
|
||||
Timing rjsmin ... ( 26.4 KiB >) 16.10 ms (factor: 7.30, 3.72, 24.27, 25.78)
|
||||
Timing _rjsmin ... ( 26.4 KiB >) 0.18 ms (factor: 664.09, 338.32, 2207.67, 2345.54, 90.97)
|
||||
Timing simple_port ... ( 26.4 KiB *) 118.82 ms
|
||||
Timing jsmin_2_0_9 ... ( 26.4 KiB >) 60.82 ms (factor: 1.95)
|
||||
Timing slimit_0_8_1 ... ( 26.5 KiB >) 379.62 ms (factor: 0.31, 0.16)
|
||||
Timing slimit_0_8_1_mangle ... ( 22.2 KiB <) 404.06 ms (factor: 0.29, 0.15, 0.94)
|
||||
Timing rjsmin ... ( 26.4 KiB >) 15.94 ms (factor: 7.45, 3.81, 23.81, 25.34)
|
||||
Timing _rjsmin ... ( 26.4 KiB >) 0.18 ms (factor: 674.14, 345.09, 2153.87, 2292.52, 90.46)
|
||||
|
||||
Benchmarking 'bench/jquery-1.7.1.js'... (242.4 KiB)
|
||||
Timing simple_port ... (135.9 KiB *) 616.05 ms
|
||||
Timing jsmin_2_0_9 ... (136.8 KiB >) 371.60 ms (factor: 1.66)
|
||||
Timing slimit_0_8_1 ... (134.0 KiB <) 1849.66 ms (factor: 0.33, 0.20)
|
||||
Timing slimit_0_8_1_mangle ... ( 95.0 KiB <) 2191.50 ms (factor: 0.28, 0.17, 0.84)
|
||||
Timing rjsmin ... (135.9 KiB =) 113.46 ms (factor: 5.43, 3.28, 16.30, 19.31)
|
||||
Timing _rjsmin ... (135.9 KiB =) 1.12 ms (factor: 548.77, 331.02, 1647.66, 1952.17, 101.07)
|
||||
Timing simple_port ... (135.9 KiB *) 624.62 ms
|
||||
Timing jsmin_2_0_9 ... (136.8 KiB >) 370.86 ms (factor: 1.68)
|
||||
Timing slimit_0_8_1 ... (134.0 KiB <) 1800.29 ms (factor: 0.35, 0.21)
|
||||
Timing slimit_0_8_1_mangle ... ( 95.0 KiB <) 2129.26 ms (factor: 0.29, 0.17, 0.85)
|
||||
Timing rjsmin ... (135.9 KiB =) 113.71 ms (factor: 5.49, 3.26, 15.83, 18.73)
|
||||
Timing _rjsmin ... (135.9 KiB =) 1.12 ms (factor: 559.59, 332.25, 1612.87, 1907.59, 101.87)
|
||||
|
||||
Benchmarking 'bench/knockout-2.0.0.js'... (38.9 KiB)
|
||||
Timing simple_port ... ( 38.6 KiB *) 117.73 ms
|
||||
Timing jsmin_2_0_9 ... ( 38.6 KiB >) 67.54 ms (factor: 1.74)
|
||||
Timing slimit_0_8_1 ... ( 39.0 KiB >) 730.03 ms (factor: 0.16, 0.09)
|
||||
Timing slimit_0_8_1_mangle ... ( 38.9 KiB >) 866.40 ms (factor: 0.14, 0.08, 0.84)
|
||||
Timing rjsmin ... ( 38.6 KiB >) 3.44 ms (factor: 34.19, 19.62, 212.03, 251.63)
|
||||
Timing _rjsmin ... ( 38.6 KiB >) 0.09 ms (factor: 1257.01, 721.18, 7794.84, 9250.84, 36.76)
|
||||
Timing simple_port ... ( 38.6 KiB *) 118.56 ms
|
||||
Timing jsmin_2_0_9 ... ( 38.6 KiB >) 67.29 ms (factor: 1.76)
|
||||
Timing slimit_0_8_1 ... ( 39.0 KiB >) 703.96 ms (factor: 0.17, 0.10)
|
||||
Timing slimit_0_8_1_mangle ... ( 38.9 KiB >) 844.49 ms (factor: 0.14, 0.08, 0.83)
|
||||
Timing rjsmin ... ( 38.6 KiB >) 3.38 ms (factor: 35.11, 19.93, 208.47, 250.09)
|
||||
Timing _rjsmin ... ( 38.6 KiB >) 0.09 ms (factor: 1288.21, 731.08, 7648.52, 9175.39, 36.69)
|
||||
|
||||
Benchmarking 'bench/markermanager.js'... (28.6 KiB)
|
||||
Timing simple_port ... ( 11.6 KiB *) 58.19 ms
|
||||
Timing jsmin_2_0_9 ... ( 11.6 KiB >) 30.59 ms (factor: 1.90)
|
||||
Timing slimit_0_8_1 ... ( 11.5 KiB <) 147.98 ms (factor: 0.39, 0.21)
|
||||
Timing slimit_0_8_1_mangle ... ( 9.3 KiB <) 175.33 ms (factor: 0.33, 0.17, 0.84)
|
||||
Timing rjsmin ... ( 11.6 KiB =) 6.99 ms (factor: 8.32, 4.38, 21.17, 25.08)
|
||||
Timing _rjsmin ... ( 11.6 KiB =) 0.08 ms (factor: 706.24, 371.23, 1795.92, 2127.85, 84.84)
|
||||
Timing simple_port ... ( 11.6 KiB *) 59.09 ms
|
||||
Timing jsmin_2_0_9 ... ( 11.6 KiB >) 30.78 ms (factor: 1.92)
|
||||
Timing slimit_0_8_1 ... ( 11.5 KiB <) 145.18 ms (factor: 0.41, 0.21)
|
||||
Timing slimit_0_8_1_mangle ... ( 9.3 KiB <) 164.81 ms (factor: 0.36, 0.19, 0.88)
|
||||
Timing rjsmin ... ( 11.6 KiB =) 6.94 ms (factor: 8.51, 4.43, 20.91, 23.74)
|
||||
Timing _rjsmin ... ( 11.6 KiB =) 0.08 ms (factor: 725.97, 378.16, 1783.50, 2024.64, 85.28)
|
||||
|
||||
|
||||
$ python2.6 -OO bench.py bench/*.js
|
||||
$ python2.6 -OO bench/main.py bench/*.js
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Python Release: 2.6.8
|
||||
|
||||
Benchmarking 'bench/apiviewer.js'... (953.2 KiB)
|
||||
Timing simple_port ... (951.5 KiB *) 2702.82 ms
|
||||
Timing jsmin_2_0_9 ... (951.5 KiB >) 2736.13 ms (factor: 0.99)
|
||||
Timing slimit_0_8_1 ... (944.3 KiB <) 13661.62 ms (factor: 0.20, 0.20)
|
||||
Timing slimit_0_8_1_mangle ... (922.9 KiB <) 17224.00 ms (factor: 0.16, 0.16, 0.79)
|
||||
Timing rjsmin ... (951.5 KiB =) 60.46 ms (factor: 44.71, 45.26, 225.97, 284.89)
|
||||
Timing _rjsmin ... (951.5 KiB =) 1.95 ms (factor: 1386.98, 1404.07, 7010.58, 8838.65, 31.02)
|
||||
Timing simple_port ... (951.5 KiB *) 2666.59 ms
|
||||
Timing jsmin_2_0_9 ... (951.5 KiB >) 2628.62 ms (factor: 1.01)
|
||||
Timing slimit_0_8_1 ... (944.3 KiB <) 13410.38 ms (factor: 0.20, 0.20)
|
||||
Timing slimit_0_8_1_mangle ... (922.9 KiB <) 16661.34 ms (factor: 0.16, 0.16, 0.80)
|
||||
Timing rjsmin ... (951.5 KiB =) 62.67 ms (factor: 42.55, 41.94, 213.97, 265.84)
|
||||
Timing _rjsmin ... (951.5 KiB =) 1.92 ms (factor: 1387.91, 1368.15, 6979.86, 8671.93, 32.62)
|
||||
|
||||
Benchmarking 'bench/bootstrap.js'... (49.0 KiB)
|
||||
Timing simple_port ... ( 26.4 KiB *) 110.58 ms
|
||||
Timing jsmin_2_0_9 ... ( 26.4 KiB >) 49.16 ms (factor: 2.25)
|
||||
Timing slimit_0_8_1 ... ( 26.5 KiB >) 344.00 ms (factor: 0.32, 0.14)
|
||||
Timing slimit_0_8_1_mangle ... ( 22.2 KiB <) 421.63 ms (factor: 0.26, 0.12, 0.82)
|
||||
Timing rjsmin ... ( 26.4 KiB >) 15.67 ms (factor: 7.06, 3.14, 21.95, 26.91)
|
||||
Timing _rjsmin ... ( 26.4 KiB >) 0.18 ms (factor: 602.37, 267.77, 1873.82, 2296.73, 85.36)
|
||||
Timing simple_port ... ( 26.4 KiB *) 109.21 ms
|
||||
Timing jsmin_2_0_9 ... ( 26.4 KiB >) 49.00 ms (factor: 2.23)
|
||||
Timing slimit_0_8_1 ... ( 26.5 KiB >) 380.13 ms (factor: 0.29, 0.13)
|
||||
Timing slimit_0_8_1_mangle ... ( 22.2 KiB <) 409.65 ms (factor: 0.27, 0.12, 0.93)
|
||||
Timing rjsmin ... ( 26.4 KiB >) 16.14 ms (factor: 6.77, 3.04, 23.55, 25.38)
|
||||
Timing _rjsmin ... ( 26.4 KiB >) 0.18 ms (factor: 621.09, 278.66, 2161.76, 2329.63, 91.80)
|
||||
|
||||
Benchmarking 'bench/jquery-1.7.1.js'... (242.4 KiB)
|
||||
Timing simple_port ... (135.9 KiB *) 580.19 ms
|
||||
Timing jsmin_2_0_9 ... (136.8 KiB >) 305.27 ms (factor: 1.90)
|
||||
Timing slimit_0_8_1 ... (134.0 KiB <) 1791.88 ms (factor: 0.32, 0.17)
|
||||
Timing slimit_0_8_1_mangle ... ( 95.0 KiB <) 2227.14 ms (factor: 0.26, 0.14, 0.80)
|
||||
Timing rjsmin ... (135.9 KiB =) 112.36 ms (factor: 5.16, 2.72, 15.95, 19.82)
|
||||
Timing _rjsmin ... (135.9 KiB =) 1.12 ms (factor: 517.20, 272.13, 1597.35, 1985.36, 100.16)
|
||||
Timing simple_port ... (135.9 KiB *) 569.29 ms
|
||||
Timing jsmin_2_0_9 ... (136.8 KiB >) 303.84 ms (factor: 1.87)
|
||||
Timing slimit_0_8_1 ... (134.0 KiB <) 1775.18 ms (factor: 0.32, 0.17)
|
||||
Timing slimit_0_8_1_mangle ... ( 95.0 KiB <) 2175.70 ms (factor: 0.26, 0.14, 0.82)
|
||||
Timing rjsmin ... (135.9 KiB =) 114.20 ms (factor: 4.98, 2.66, 15.54, 19.05)
|
||||
Timing _rjsmin ... (135.9 KiB =) 1.14 ms (factor: 498.07, 265.83, 1553.12, 1903.54, 99.92)
|
||||
|
||||
Benchmarking 'bench/knockout-2.0.0.js'... (38.9 KiB)
|
||||
Timing simple_port ... ( 38.6 KiB *) 108.59 ms
|
||||
Timing jsmin_2_0_9 ... ( 38.6 KiB >) 52.81 ms (factor: 2.06)
|
||||
Timing slimit_0_8_1 ... ( 39.0 KiB >) 704.32 ms (factor: 0.15, 0.07)
|
||||
Timing slimit_0_8_1_mangle ... ( 38.9 KiB >) 889.61 ms (factor: 0.12, 0.06, 0.79)
|
||||
Timing rjsmin ... ( 38.6 KiB >) 3.41 ms (factor: 31.84, 15.49, 206.53, 260.87)
|
||||
Timing _rjsmin ... ( 38.6 KiB >) 0.09 ms (factor: 1173.68, 570.86, 7612.89, 9615.63, 36.86)
|
||||
Timing simple_port ... ( 38.6 KiB *) 106.63 ms
|
||||
Timing jsmin_2_0_9 ... ( 38.6 KiB >) 52.70 ms (factor: 2.02)
|
||||
Timing slimit_0_8_1 ... ( 39.0 KiB >) 698.62 ms (factor: 0.15, 0.08)
|
||||
Timing slimit_0_8_1_mangle ... ( 38.9 KiB >) 865.02 ms (factor: 0.12, 0.06, 0.81)
|
||||
Timing rjsmin ... ( 38.6 KiB >) 3.57 ms (factor: 29.90, 14.78, 195.88, 242.54)
|
||||
Timing _rjsmin ... ( 38.6 KiB >) 0.09 ms (factor: 1160.17, 573.35, 7601.29, 9411.79, 38.81)
|
||||
|
||||
Benchmarking 'bench/markermanager.js'... (28.6 KiB)
|
||||
Timing simple_port ... ( 11.6 KiB *) 54.88 ms
|
||||
Timing jsmin_2_0_9 ... ( 11.6 KiB >) 25.42 ms (factor: 2.16)
|
||||
Timing slimit_0_8_1 ... ( 11.5 KiB <) 139.34 ms (factor: 0.39, 0.18)
|
||||
Timing slimit_0_8_1_mangle ... ( 9.3 KiB <) 177.52 ms (factor: 0.31, 0.14, 0.78)
|
||||
Timing rjsmin ... ( 11.6 KiB =) 6.87 ms (factor: 7.98, 3.70, 20.27, 25.82)
|
||||
Timing _rjsmin ... ( 11.6 KiB =) 0.08 ms (factor: 668.31, 309.53, 1696.75, 2161.62, 83.71)
|
||||
Timing simple_port ... ( 11.6 KiB *) 54.44 ms
|
||||
Timing jsmin_2_0_9 ... ( 11.6 KiB >) 25.41 ms (factor: 2.14)
|
||||
Timing slimit_0_8_1 ... ( 11.5 KiB <) 137.57 ms (factor: 0.40, 0.18)
|
||||
Timing slimit_0_8_1_mangle ... ( 9.3 KiB <) 172.31 ms (factor: 0.32, 0.15, 0.80)
|
||||
Timing rjsmin ... ( 11.6 KiB =) 6.93 ms (factor: 7.86, 3.67, 19.86, 24.87)
|
||||
Timing _rjsmin ... ( 11.6 KiB =) 0.08 ms (factor: 671.23, 313.25, 1696.29, 2124.63, 85.42)
|
||||
|
||||
|
||||
$ python2.5 -OO bench/main.py bench/*.js
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Python Release: 2.5.6
|
||||
|
||||
Benchmarking 'bench/apiviewer.js'... (953.2 KiB)
|
||||
Timing simple_port ... (951.5 KiB *) 2702.99 ms
|
||||
Timing jsmin_2_0_9 ... (951.5 KiB >) 2716.83 ms (factor: 0.99)
|
||||
Timing slimit_0_8_1 ... (944.3 KiB <) 14369.86 ms (factor: 0.19, 0.19)
|
||||
FAILED slimit_0_8_1_mangle
|
||||
Timing rjsmin ... (951.5 KiB =) 57.95 ms (factor: 46.64, 46.88, 247.96)
|
||||
Timing _rjsmin ... (951.5 KiB =) 1.87 ms (factor: 1443.98, 1451.38, 7676.63, 30.96)
|
||||
|
||||
Benchmarking 'bench/bootstrap.js'... (49.0 KiB)
|
||||
Timing simple_port ... ( 26.4 KiB *) 109.86 ms
|
||||
Timing jsmin_2_0_9 ... ( 26.4 KiB >) 51.67 ms (factor: 2.13)
|
||||
Timing slimit_0_8_1 ... ( 26.5 KiB >) 364.04 ms (factor: 0.30, 0.14)
|
||||
FAILED slimit_0_8_1_mangle
|
||||
Timing rjsmin ... ( 26.4 KiB >) 15.45 ms (factor: 7.11, 3.34, 23.57)
|
||||
Timing _rjsmin ... ( 26.4 KiB >) 0.17 ms (factor: 652.77, 306.98, 2163.04, 91.78)
|
||||
|
||||
Benchmarking 'bench/jquery-1.7.1.js'... (242.4 KiB)
|
||||
Timing simple_port ... (135.9 KiB *) 571.75 ms
|
||||
Timing jsmin_2_0_9 ... (136.8 KiB >) 320.28 ms (factor: 1.79)
|
||||
Timing slimit_0_8_1 ... (134.0 KiB <) 1744.62 ms (factor: 0.33, 0.18)
|
||||
FAILED slimit_0_8_1_mangle
|
||||
Timing rjsmin ... (135.9 KiB =) 108.43 ms (factor: 5.27, 2.95, 16.09)
|
||||
Timing _rjsmin ... (135.9 KiB =) 1.11 ms (factor: 514.49, 288.20, 1569.90, 97.57)
|
||||
|
||||
Benchmarking 'bench/knockout-2.0.0.js'... (38.9 KiB)
|
||||
Timing simple_port ... ( 38.6 KiB *) 107.76 ms
|
||||
Timing jsmin_2_0_9 ... ( 38.6 KiB >) 56.06 ms (factor: 1.92)
|
||||
Timing slimit_0_8_1 ... ( 39.0 KiB >) 685.51 ms (factor: 0.16, 0.08)
|
||||
FAILED slimit_0_8_1_mangle
|
||||
Timing rjsmin ... ( 38.6 KiB >) 3.34 ms (factor: 32.24, 16.77, 205.10)
|
||||
Timing _rjsmin ... ( 38.6 KiB >) 0.09 ms (factor: 1218.61, 633.96, 7752.04, 37.80)
|
||||
|
||||
Benchmarking 'bench/markermanager.js'... (28.6 KiB)
|
||||
Timing simple_port ... ( 11.6 KiB *) 54.28 ms
|
||||
Timing jsmin_2_0_9 ... ( 11.6 KiB >) 26.70 ms (factor: 2.03)
|
||||
Timing slimit_0_8_1 ... ( 11.5 KiB <) 142.60 ms (factor: 0.38, 0.19)
|
||||
FAILED slimit_0_8_1_mangle
|
||||
Timing rjsmin ... ( 11.6 KiB =) 6.66 ms (factor: 8.15, 4.01, 21.40)
|
||||
Timing _rjsmin ... ( 11.6 KiB =) 0.08 ms (factor: 684.64, 336.80, 1798.82, 84.04)
|
||||
|
||||
|
||||
$ python2.4 -OO bench/main.py bench/*.js
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
slimit_0_8_1 not installed for python 2.4...
|
||||
Python Release: 2.4.6
|
||||
|
||||
Benchmarking 'bench/apiviewer.js'... (953.2 KiB)
|
||||
Timing simple_port ... (951.5 KiB *) 2683.16 ms
|
||||
Timing jsmin_2_0_9 ... (951.5 KiB >) 2613.60 ms (factor: 1.03)
|
||||
Timing rjsmin ... (951.5 KiB =) 59.43 ms (factor: 45.15, 43.98)
|
||||
Timing _rjsmin ... (951.5 KiB =) 1.90 ms (factor: 1413.59, 1376.94, 31.31)
|
||||
|
||||
Benchmarking 'bench/bootstrap.js'... (49.0 KiB)
|
||||
Timing simple_port ... ( 26.4 KiB *) 111.40 ms
|
||||
Timing jsmin_2_0_9 ... ( 26.4 KiB >) 48.93 ms (factor: 2.28)
|
||||
Timing rjsmin ... ( 26.4 KiB >) 15.83 ms (factor: 7.04, 3.09)
|
||||
Timing _rjsmin ... ( 26.4 KiB >) 0.17 ms (factor: 657.59, 288.82, 93.41)
|
||||
|
||||
Benchmarking 'bench/jquery-1.7.1.js'... (242.4 KiB)
|
||||
Timing simple_port ... (135.9 KiB *) 579.89 ms
|
||||
Timing jsmin_2_0_9 ... (136.8 KiB >) 302.57 ms (factor: 1.92)
|
||||
Timing rjsmin ... (135.9 KiB =) 108.56 ms (factor: 5.34, 2.79)
|
||||
Timing _rjsmin ... (135.9 KiB =) 1.08 ms (factor: 539.43, 281.45, 100.98)
|
||||
|
||||
Benchmarking 'bench/knockout-2.0.0.js'... (38.9 KiB)
|
||||
Timing simple_port ... ( 38.6 KiB *) 107.04 ms
|
||||
Timing jsmin_2_0_9 ... ( 38.6 KiB >) 52.66 ms (factor: 2.03)
|
||||
Timing rjsmin ... ( 38.6 KiB >) 3.26 ms (factor: 32.88, 16.18)
|
||||
Timing _rjsmin ... ( 38.6 KiB >) 0.09 ms (factor: 1211.21, 595.89, 36.83)
|
||||
|
||||
Benchmarking 'bench/markermanager.js'... (28.6 KiB)
|
||||
Timing simple_port ... ( 11.6 KiB *) 55.65 ms
|
||||
Timing jsmin_2_0_9 ... ( 11.6 KiB >) 25.33 ms (factor: 2.20)
|
||||
Timing rjsmin ... ( 11.6 KiB =) 6.62 ms (factor: 8.41, 3.83)
|
||||
Timing _rjsmin ... ( 11.6 KiB =) 0.08 ms (factor: 711.59, 323.87, 84.60)
|
||||
|
||||
|
||||
# vim: nowrap
|
||||
|
@ -21,7 +21,7 @@
|
||||
rJSmin - Benchmark
|
||||
====================
|
||||
|
||||
The following numbers have been measured with the bench.py script
|
||||
The following numbers have been measured with the bench package
|
||||
provided in the source distribution. Since the numbers don't vary much
|
||||
between python minor releases (e.g. 2.6 vs 2.7), only the benchmarks for
|
||||
2.7 and 3.4 are given below. The :file:`docs/BENCHMARKS` file in the source
|
||||
|
22
make.py
22
make.py
@ -98,8 +98,8 @@ class Benchmark(Target):
|
||||
python = shell.frompath(self.python)
|
||||
return not shell.spawn(*[
|
||||
python,
|
||||
shell.native('bench.py'),
|
||||
'-c10'
|
||||
'-mbench.main',
|
||||
'-c10',
|
||||
] + files)
|
||||
|
||||
def clean(self, scm, dist):
|
||||
@ -113,24 +113,6 @@ class Benchmark(Target):
|
||||
shell.rm(shell.native('bench/jsmin'))
|
||||
|
||||
|
||||
class Benchmark2(Benchmark):
|
||||
""" Benchmark """
|
||||
NAME = "bench2"
|
||||
python = "python2"
|
||||
|
||||
def clean(self, scm, dist):
|
||||
pass
|
||||
|
||||
|
||||
class Benchmark3(Benchmark):
|
||||
""" Benchmark """
|
||||
NAME = "bench3"
|
||||
python = "python3"
|
||||
|
||||
def clean(self, scm, dist):
|
||||
pass
|
||||
|
||||
|
||||
class Check(Target):
|
||||
""" Check the python code """
|
||||
NAME = "check"
|
||||
|
@ -74,5 +74,4 @@ modules = rjsmin
|
||||
#scripts =
|
||||
|
||||
dist =
|
||||
bench.py
|
||||
bench
|
||||
|
Loading…
Reference in New Issue
Block a user