??????????????£??????JSON?????python2.6?????????json?????Ч?????????
????1K???????2.9GHz??CPU?????????????dump??36898?Ρ??????pyamf??5?????????????????pyamf??1.67????1101/656????
????start_time: 1370747463.77
????loop_num: 36898
????end_time:   1370747464.78
?????????simplejson????а??C?????????£?
????simplejson????а??C????????????????????
????start_time: 1370748132.87
????loop_num: 1361
????end_time:   1370748133.88
????Ч???????????
????????????????
#! /usr/bin/env python
#coding=utf-8
import time
import json
test_data = {
'baihe': {
'name': unicode('???'?? 'utf-8')??
'say': unicode('???£??????????'?? 'utf-8')??
'grow_time': 0.5??
'fruit_time':  0.5??
'super_time': 0.5??
'total_time': 1??
'buy':{'gold':2?? } ??
'harvest_fruit': 1??
'harvest_super': 1??
'sale': 1??
'level_need': 0??
'experience' : 2??
'exp_fruit': 1??
'exp_super': 1??
'used': True??
}??
'1':{
'interval' : 0.3??
'probability' : {
'98': {'chips' : (5?? 25)?? }??
'2' : {'gem' : (1??1)?? }??
}??
}??
'2':{
'unlock' : {'chips':1000?? 'FC':10??}??
'interval' : 12??
'probability' : {
'70': {'chips' : (120?? 250)?? }??
'20': {'gem' : (1??1)?? }??
'10': {'gem' : (2??2)?? }??
}??
}??
'one':{
'10??5' :{'id':'m01'?? 'Y':1?? 'msg':u'???????????????????'??}??
'3??7'  :{'id':'m02'?? 'Y':10??'msg':u'???????????????????????'??}??
'15??5' :{'id':'m03'?? 'Y':2?? 'msg':u'????????????'??}??
'7??4'  :{'id':'m04'?? 'Y':4?? 'msg':u'??????????????????……'??}??
'2??12' :{'id':'m05'?? 'Y':6?? 'msg':u'???????????????'??}??
}??
}
start_time = time.time()
print "start_time:"?? start_time
j = 1
while True:
j += 1
a = json.dumps(test_data)
data_length = len(a)
end_time = time.time()
if end_time - start_time >= 1 :
break
print "loop_num:"?? j
print "end_time:  "??end_time
print data_length ??a
???????python?????json?????????????simplejson????????C????????Ч?????????