https://github.com/mupq/pqm4
Revision 23623199b99b1d4915e402229e971c38e4e701a1 authored by Matthias J. Kannwischer on 12 June 2019, 08:44:29 UTC, committed by GitHub on 12 June 2019, 08:44:29 UTC
1 parent 93c5c86
Raw File
Tip revision: 23623199b99b1d4915e402229e971c38e4e701a1 authored by Matthias J. Kannwischer on 12 June 2019, 08:44:29 UTC
Update README.md
Tip revision: 2362319
benchmarks.py
#!/usr/bin/env python3
from mupq import mupq
from interface import M4Settings, M4

import sys

if __name__ == "__main__":
    with M4() as m4:
        if "--nostack" not in sys.argv:
            test = mupq.StackBenchmark(M4Settings(), m4)
            test.test_all(sys.argv[1:])

        if "--nospeed" not in sys.argv:
            test = mupq.SpeedBenchmark(M4Settings(), m4)
            test.test_all(sys.argv[1:])

        if "--nohashing" not in sys.argv:
            test = mupq.HashingBenchmark(M4Settings(), m4)
            test.test_all(sys.argv[1:])

        if "--nosize" not in sys.argv:
            test = mupq.SizeBenchmark(M4Settings(), m4)
            test.test_all(sys.argv[1:])
back to top