0b70c0d37c
* NEW: Add a new 'string' benchmark. git-svn-id: svn://localhost/gambas/trunk@7442 867c0c6c-44f3-4631-809d-bfa615b0a4ec
24 lines
397 B
Python
Executable File
24 lines
397 B
Python
Executable File
#!/usr/bin/python
|
|
|
|
import re
|
|
import time
|
|
import sys
|
|
|
|
str = 'abcdefgh'+'efghefgh'
|
|
imax = 1024/len(str)*768
|
|
|
|
starttime = time.time();
|
|
sys.stdout.flush()
|
|
|
|
gstr = ''
|
|
i = 0
|
|
|
|
while (i < imax+1000):
|
|
i = i + 1
|
|
gstr += str
|
|
gstr = re.sub('efgh','____',gstr)
|
|
lngth = len(str) * i
|
|
if (lngth % (1024*256) == 0):
|
|
print int(time.time()-starttime),"sec\t\t",(lngth/1024),"kb"
|
|
sys.stdout.flush()
|