Last active
August 29, 2015 14:02
-
-
Save akahana-1/e70f308946ce122acd58 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
# -*- coding:utf-8 -*- | |
import subprocess | |
#import csv | |
import random | |
import time | |
import matplotlib.pyplot as plot | |
efiles = ["./a.out {0} {1}", "python3 prime.py {0} {1}"] | |
query = reversed(sorted([int(10**(x/2) * random.random()) for x in range(4, 15)])) | |
for x in range(3, 4): | |
for command in efiles: | |
t = [] | |
for q in query: | |
print(q) | |
stime = time.process_time() | |
subprocess.call(command.format(x, q).split(), stdout=subprocess.DEVNULL) | |
etime = time.process_time() | |
t.append(etime - stime) | |
print(etime - stime) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment