Python Interpreters Benchmarks
x64 ArchLinux : AMD® Ryzen 7 4700U®

 performance measurements

Each table row shows performance measurements for this program with a particular command-line input value N.

 N  CPU secs Elapsed secs Memory KB Code B ≈ CPU Load

Read the ↓ make, command line, and program output logs to see how this program was run.

Read  benchmark to see what this program should do.

 notes

  source code

# The Computer Language Benchmarks Game
# http://benchmarksgame.alioth.debian.org/

# contributed by Jacob Lee, Steven Bethard, et al
# 2to3, fixed by Daniele Varrazzo
# modified by Daniel Nanz
# read() input, write in reverse, cleanups by J. Kleint

import sys, string

def show(seq, table, write=sys.stdout.write, nl=b'\n'):
    header, s = seq.split(nl, 1)
    s = s.translate(table, nl)
    write(b'>' + header + nl)
    for i in range(len(s) - 60 - 1, -1, -60):
        write(s[i + 60:i:-1] + nl)
    write(s[0:i + 1][::-1] + nl)

def main():
    table = string.maketrans(b'ACBDGHKMNSRUTWVYacbdghkmnsrutwvy', 
                            b'TGVHCDMKNSYAAWBRTGVHCDMKNSYAAWBR')
    for seq in sys.stdin.read().split(b'>')[1:]:
        show(seq, table)

main()

 make, command-line, and program output logs

 Wed, 28 Sep 2022 09:31:23 GMT

COMMAND LINE:
 /usr/bin/pyston revcomp.pyston-5.pyston 0 < revcomp-input1000.txt

PROGRAM FAILED 


PROGRAM OUTPUT:

Traceback (most recent call last):
  File "revcomp.pyston-5.pyston", line 25, in <module>
    main()
  File "revcomp.pyston-5.pyston", line 20, in main
    table = string.maketrans(b'ACBDGHKMNSRUTWVYacbdghkmnsrutwvy', 
AttributeError: module 'string' has no attribute 'maketrans'

Revised BSD license

  Home   Conclusions   License   Play