mirror of
https://github.com/vale981/ray
synced 2025-03-08 19:41:38 -05:00
27 lines
516 B
Python
27 lines
516 B
Python
![]() |
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
|