예제 #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)