benchmark | best* result | dylan | times |
---|---|---|---|
n-body | 16.165 | 162.351 | 10.043365 |
fannkuch-redux | 32.081 | 1301.825 | 40.579315 |
fasta | 3.564 | 74.401 | 20.875701 |
spectral-norm | 6.010 | 156.594 | 26.055574 |
mandelbrot (N=1600) | 0.273 | 3.477 | 12.736264 |
k-nucleotide (N=2.5M) | 3.231 | 159.239 | 49.284742 |
binary-trees | 8.505 | 184.707 | 21.717460 |
- GitHub Staff
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
a={-1//1,""""/=>3} | |
#if 0 | |
BEGIN { puts `cat flag`; exit; } | |
__END__ | |
"""} # " | |
import os; os.system('cat flag') | |
""" # " | |
#endif | |
}; | |
main () { system("cat flag"); } /* -} 0 |
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
module: dispatch-benchmarks | |
define open abstract class <my-collection> (<object>) | |
end class <my-collection>; | |
define open generic my-element (collection :: <my-collection>, n :: <integer>) => (nth :: <object>); | |
define method my-element | |
(collection :: <my-collection>, n :: <integer>) | |
=> (nth :: <object>) |
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
module: byte-vector-test | |
define library byte-vector-test | |
use common-dylan; | |
use io; | |
end library; | |
define module byte-vector-test | |
use common-dylan, exclude: { format-to-string }; | |
use byte-vector; |
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
#include <iostream> | |
#include <sstream> | |
#include <vector> | |
using namespace std; | |
int _golomb(vector<int>& golomb_values, int n); | |
int golomb(vector<int>& golomb_values, int n) { | |
if (golomb_values.size() < n) { |
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
module: self-describing-sequence | |
define constant <integer-vector> = limited(<simple-vector>, of: <integer>); | |
define function golomb | |
(golomb-sequence :: <integer-vector>, n :: <integer>) | |
=> (fn :: <integer>) | |
without-bounds-checks | |
when(golomb-sequence[n - 1] = 0) | |
golomb-sequence[n - 1] := %golomb(golomb-sequence, n); |
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
module: split-test | |
define function main(name, arguments) | |
format-out("%d %d\n", | |
size(split("a b c ", " ", remove-if-empty: #f)), | |
size(split("a b c ", " ", remove-if-empty: #t))); | |
exit-application(0); | |
end function main; | |
main(application-name(), application-arguments()); |
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
module: majority | |
define function winner (votes :: <collection>) | |
let winner | |
= reduce1(method (a, b) if (a.last > b.last) a else b end end, | |
map(method (candidate) | |
pair(candidate, size(choose(curry(\=, candidate), votes))); | |
end, | |
remove-duplicates(votes))); | |
unless (zero?(round/(winner.tail, votes.size))) |
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
: toandfro ( sequence n -- string ) | |
group [ odd? [ reverse ] when ] map-index | |
flip concat >string ; |