Last active
November 7, 2023 18:52
-
-
Save patham9/9af1fb750ed37dd3b0c31c3740e7ccd9 to your computer and use it in GitHub Desktop.
Mettamorph speedup (Processor: 1,6 GHz Dual-Core Intel Core i5, OS: macOS Monterey)
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
python3 timing.py | |
Starting 4 tests with 10 runs each, grab a coffee! | |
== | |
Compilation started. | |
Compilation complete. | |
TEST: !(factorial 30) | |
[265252859812191058636308480000000] | |
[265252859812191058636308480000000] | |
........ | |
Time MeTTa: avg=3.9196492433547974 seconds, var=0.019423207564014434 | |
Time Scheme: avg=0.017225813865661622 seconds, var=2.167314654002439e-06 | |
Speedup: 227.54508285778743 times faster | |
== | |
Compilation started. | |
Compilation complete. | |
TEST: !(range 1 30) | |
[(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29)] | |
[(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29)] | |
........ | |
Time MeTTa: avg=8.489736986160278 seconds, var=0.006435794465151047 | |
Time Scheme: avg=0.018970656394958495 seconds, var=2.636572080575661e-05 | |
Speedup: 447.51941152739704 times faster | |
== | |
Compilation started. | |
Compilation complete. | |
TEST: !(TupleCount (1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30)) | |
[29] | |
[29] | |
........ | |
Time MeTTa: avg=15.459793972969056 seconds, var=0.49385598767520433 | |
Time Scheme: avg=0.025065970420837403 seconds, var=0.00024507563395047787 | |
Speedup: 616.7642310834808 times faster | |
== | |
Compilation started. | |
Compilation complete. | |
TEST: !(StampDisjoint (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30) | |
(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30)) | |
[False] | |
[#f] | |
........ | |
Time MeTTa: avg=2.068554496765137 seconds, var=0.0016757250549881066 | |
Time Scheme: avg=0.02003307342529297 seconds, var=2.8543337066366803e-07 | |
Speedup: 103.25697175119727 times faster |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment