mirror of
https://github.com/wassname/ray.git
synced 2026-07-07 05:35:39 +08:00
Initial Support for Airspeed Velocity (#2113)
* asv init * move asv * init benchmarks * small changes * running basics * ok done * readme * ok * update * linting * linting * linting * linting * Update and rename README-benchmarks.md to README-benchmarks.rst * Update benchmarks.py * linting
This commit is contained in:
committed by
Philipp Moritz
parent
9b9ff19dd0
commit
01f69689ed
@@ -0,0 +1,26 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
|
||||
class TimeSuite(object):
|
||||
"""An example benchmark."""
|
||||
|
||||
def setup(self):
|
||||
self.d = {}
|
||||
for x in range(500):
|
||||
self.d[x] = None
|
||||
|
||||
def time_keys(self):
|
||||
for key in self.d.keys():
|
||||
pass
|
||||
|
||||
def time_range(self):
|
||||
d = self.d
|
||||
for key in range(500):
|
||||
d[key]
|
||||
|
||||
|
||||
class MemSuite(object):
|
||||
def mem_list(self):
|
||||
return [0] * 256
|
||||
Reference in New Issue
Block a user