Пример #1
0
def benchmark_objson2_set(text, times=1000000):
    obj = objson.loads2(text)
    for _ in xrange(times):
        obj.name = 'benjamin2'
Пример #2
0
def benchmark_objson2(text, times=100000):
    for _ in xrange(times):
        objson.loads2(text)
Пример #3
0
def benchmark_objson2_get(text, times=1000000):
    obj = objson.loads2(text)
    for _ in xrange(times):
        x = obj.name
Пример #4
0
def benchmark_objson2_dumps(text, times=100000):
    obj = objson.loads2(text)
    for _ in xrange(times):
        objson.dumps2(obj)