-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reverse_int #262
reverse_int #262
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super cool and compact idea! Here is one minor suggestion. And it would also be great to include #263 to this PR.
benchmarks/core/reverse.bril
Outdated
@@ -0,0 +1,31 @@ | |||
|
|||
@main{ | |||
input: int = const 123; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is OK, but to make the benchmark a little more reusable, you might consider making the input a parameter. Here's an example:
bril/benchmarks/core/armstrong.bril
Lines 1 to 2 in a7a0759
# ARGS: 407 | |
@main(input : int) { |
That is, you can make input
a parameter to @main
and then give it a value like # ARGS: 123
for benchmark automation purposes.
Hmm… it looks like this may have erroneously reformatted the whole |
ooops it seems that it autoformats when I save the file. I have pushed a fix. @sampsyo |
Looks good; thanks! |
reverse the integer
e.g. 123 -> 321