Changeset 3408


Ignore:
Timestamp:
Jul 19, 2013, 7:10:33 AM (6 years ago)
Author:
cameron
Message:

Alternative expressions for regex_perf; other engines

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/RE/performance/perf.py

    r3407 r3408  
    6565                call('make -C '+re_home+'output/src/' + redirectoutput,shell=True)
    6666                shutil.copyfile(re_home+'output/re_pablo_cc.py', outputpath+'/re_pablo_cc.py')
    67                 cmd = ['perf stat -x, -o perfoutput -r '+str(count)+' -e '+ execution.stat+ ' '+re_home+'output/src/re '+ execution.file.file + redirectoutput]
     67                cmd = ['perf stat -x, -o perfoutput -r '+str(count)+' -e '+ execution.stat+ ' '+re_home+'output/src/re -c '+ execution.file.file + redirectoutput]
    6868                p = Popen(cmd,shell=True)
    6969                p.wait()
     
    7272                p = Popen(cmd,shell=True)
    7373                p.wait()
     74        if execution.program=='nrgrep112':
     75                nrgreplocation='nrgrep-1.1.2/nrgrep'
     76                cmd = ['perf stat -x, -o perfoutput -r '+str(count)+' -e '+ execution.stat+ ' '+nrgreplocation+' -c \'' + execution.expression.expression + '\' '+ execution.file.file + redirectoutput]
     77                p = Popen(cmd,shell=True)
     78                p.wait()
    7479        if execution.program=='nrgrep':
    7580                nrgreplocation='nrgrep-1.0/nrgrep'
    7681                cmd = ['perf stat -x, -o perfoutput -r '+str(count)+' -e '+ execution.stat+ ' '+nrgreplocation+' -c \'' + execution.expression.expression + '\' '+ execution.file.file + redirectoutput]
     82                p = Popen(cmd,shell=True)
     83                p.wait()
     84        if execution.program=='pcregrep':
     85                pcregreplocation='pcre-8.12/pcregrep'
     86                cmd = ['perf stat -x, -o perfoutput -r '+str(count)+' -e '+ execution.stat+ ' '+pcregreplocation+' -c  \'' + execution.expression.expression + '\' '+ execution.file.file + redirectoutput]
    7787                p = Popen(cmd,shell=True)
    7888                p.wait()
     
    105115
    106116#http://sljit.sourceforge.net/regex_perf.html
    107 files.append(File('data/mark.txt','mark_twain',('regex_perf',)))
     117files.append(File('data/mark.txt','mark_twain',('regex_perf2',)))
    108118expressions.append(Expression('Twain', 'Twain', ('regex_perf',)))
    109119expressions.append(Expression('^Twain', '^Twain', ('regex_perf',)))
     
    123133expressions.append(Expression('Tom.{10,25}river|river.{10,25}Tom', 'Tom_near_river', ('regex_perf',)))
    124134
     135expressions.append(Expression('a[^x][^x][^x][^x][^x][^x][^x][^x][^x][^x][^x][^x][^x][^x][^x][^x][^x][^x][^x][^x]b', 'a----b', ('regex_perf2',)))
     136expressions.append(Expression('.?.?.?(Tom|Sawyer|Huckleberry|Finn)', '__Tom_or_Huck', ('regex_perf2',)))
     137expressions.append(Expression('^[a-zA-Z]?[a-zA-Z]?[a-zA-Z]?[a-zA-Z]?ing[^a-zA-Z]', '....ing_', ('regex_perf2',)))
     138expressions.append(Expression('^[a-zA-Z ][a-zA-Z ][a-zA-Z ][a-zA-Z ][a-zA-Z ][a-zA-Z ]*$', 'symline5+$', ('regex_perf2',)))
     139expressions.append(Expression('^.................?.?.?.?$', 'line16-20', ('regex_perf2',)))
     140expressions.append(Expression('([a-f](.[d-m].)?(.[d-m].)?[h-n])([a-f](.[d-m].)?(.[d-m].)?[h-n])', 'af_hnaf_hn', ('regex_perf2',)))
     141expressions.append(Expression('"[^"]?[^"]?[^"]?[^"]?[^"]?[^"]?[^"]?[^"]?[^"]?[^"]?[^"]?[^"]?[^"]?[^"]?[^"]?[^"]?[^"]?[^"]?[^"]?[^"]?[^"]?[^"]?[^"]?[^"]?[^"]?[^"]?[^"]?[^"]?[^"]?[^"]?[?!.]"', 'quoted_sentence0-30', ('regex_perf2',)))
     142expressions.append(Expression('Tom...........?.?.?.?.?.?.?.?.?.?.?.?.?.?.?river|river...........?.?.?.?.?.?.?.?.?.?.?.?.?.?.?Tom', 'Tom_near_river', ('regex_perf2',)))
    125143
    126144
     
    136154
    137155
    138 programs = ['bitstreams','grep']#,'nrgrep','agrep']
     156#programs = ['bitstreams','grep', 'nrgrep', 'nrgrep112', 'pcregrep']#,'agrep']
     157programs = ['bitstreams','nrgrep112']#,'agrep']
    139158stats = ['cycles', 'instructions']
    140159
Note: See TracChangeset for help on using the changeset viewer.