implemented one of the remu3 from hacker's delight for practice, of course, rustc does this for us already (as do most other compilers). #rustlangpic.twitter.com/1TiOktb6fS
Co lead of the http://crates.io team. Creator of @dieselframework. Former host of @_bikeshed and @_yakshave. Former Rails comitter. Enby. they/them
You can add location information to your Tweets, such as your city or precise location, from the web and via third-party applications. You always have the option to delete your Tweet location history. Learn more
Add this Tweet to your website by copying the code below. Learn more
Add this video to your website by copying the code below. Learn more
By embedding Twitter content in your website or app, you are agreeing to the Twitter Developer Agreement and Developer Policy.
| Country | Code | For customers of |
|---|---|---|
| United States | 40404 | (any) |
| Canada | 21212 | (any) |
| United Kingdom | 86444 | Vodafone, Orange, 3, O2 |
| Brazil | 40404 | Nextel, TIM |
| Haiti | 40404 | Digicel, Voila |
| Ireland | 51210 | Vodafone, O2 |
| India | 53000 | Bharti Airtel, Videocon, Reliance |
| Indonesia | 89887 | AXIS, 3, Telkomsel, Indosat, XL Axiata |
| Italy | 4880804 | Wind |
| 3424486444 | Vodafone | |
| » See SMS short codes for other countries | ||
This timeline is where you’ll spend most of your time, getting instant updates about what matters to you.
Hover over the profile pic and click the Following button to unfollow any account.
When you see a Tweet you love, tap the heart — it lets the person who wrote it know you shared the love.
The fastest way to share someone else’s Tweet with your followers is with a Retweet. Tap the icon to send it instantly.
Add your thoughts about any Tweet with a Reply. Find a topic you’re passionate about, and jump right in.
Get instant insight into what people are talking about now.
Follow more accounts to get instant updates about topics you care about.
See the latest conversations about any topic instantly.
Catch up instantly on the best stories happening as they unfold.
implemented one of the remu3 from hacker's delight for practice, of course, rustc does this for us already (as do most other compilers). #rustlangpic.twitter.com/1TiOktb6fS
You are not benchmarking anything, it gets optimized away
It doesn't get optimized away in real code tho, so what are the benchmarks for?
Not following... raindrops exercise from exercism.io is a fizzbuzz problem. It's remainder of 3, 5 and/or 7 (non-2^n constant in HD). This would be optimized away in real code too, as this is an optimization the compiler performs. Benches are for fun, as is looking as --emit asm.
You're literally benchmarking an empty function. You're never using the result of your rem calls, so the compiler optimizes it away. You need to return the value or use `test::black_box`.
https://gist.github.com/sgrif/979b36a145c93a5c6cc67296dc4f0a49 … will actually benchmark the functions for an unknown value of `n` (and you'll see that the builtin mod3 is faster than remu3)
that's awesome. thanks. Still have a lot to learn. Here's a test run with your functions, also an attempt to introduce some randomness as well. Results still look the same - thoughts?pic.twitter.com/S17MlwdmPQ
Last time I tried, I needed to blackbox my output too
since LLVM can also proof that no matter what n is, there are no side effects and the output is not used
The output is used if you're returning it to Bencher::iter.
weird, I did that before and it wasn't enough
Y'all are probably also running this on machines fast enough that it's <0.5ns/iter. On my machine it's 1ns and 2ns respectively
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.