|
楼主 |
发表于 2013-9-10 12:11
|
显示全部楼层
liucqa 发表于 2013-9-10 11:51
字分散的话缓存意义不大,你应该改一下算法,这么多case,速度不可能快的,应该从unicode码直接取首字母, ...
我是用的ASC()函数转换为int数据,然后建表的。
Case 48 To 57, 65 To 90: py = p '数字、大写字母
Case 97 To 122: py = Chr(i - 32) '小写字母
Case -20319 To -20284: py = "A"
Case -20063 To -19970, -19807 To -19789, -20283 To -20239, -19787 To -19776, -20237 To -20226: py = "B"
Case -19551 To -19498, -19775 To -19714, -19278 To -19219, -19295 To -19280, -19496 To -19473, -19471 To -19458, -31863 To -31852, -5946 To -5944: py = "C"
Case -18987 To -18954, -19039 To -18989, -18783 To -18768, -19218 To -19202, -18765 To -18727, -18725 To -18711, -18952 To -18946, -3597 To -3595: py = "D"
。。。。
我利用了一部分编码规律啊?
不明之处请指教! |
|