示例#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)