Read Rust - Performancehttps://readrust.net/Tue, 28 Feb 2023 04:41:39 +0000abf2d338-53ff-4fb4-892d-5376798e8649Tue, 28 Feb 2023 04:41:39 +0000Reducing code size in librsvg by removing an unnecessary generic structhttps://viruta.org/reducing-binary-size-generics.htmlFederico Mena Quinterof9045cfc-b30d-42df-8905-6b364a2388f7Thu, 9 Feb 2023 23:06:10 +0000Dramatically reducing AccessKit’s memory usagehttps://accesskit.dev/dramatically-reducing-accesskits-memory-usage/Matt Campbell9e2a7593-ab69-4fd8-b590-0eaf57aac8a6Tue, 7 Feb 2023 23:13:25 +0000Speeding up Rust semver-checking by over 2000xhttps://predr.ag/blog/speeding-up-rust-semver-checking-by-over-2000x/Predrag Gruevski41244323-fb74-4346-ad4a-3966ff71fccbSun, 29 Jan 2023 22:15:21 +0000The size of Rust Futureshttps://swatinem.de/blog/future-size/Arpad Borsos
Apart from highlighting the source of the problem in great depth, I also want to propose some workarounds for this specific issue.]]>
b8e2fbb2-3e66-4354-853a-ef6f9c63689bThu, 19 Jan 2023 23:23:17 +0000Testing SIMD instructions on ARM with Rust on Androidhttps://gendignoux.com/blog/2023/01/05/rust-arm-simd-android.htmlGuillaume Endignoux
Today, we’ll see how to effectively use the SIMD instructions themselves, and get the most performance out of them. After an introduction on running Rust benchmarks (and unit tests) on Android devices, we’ll measure the performance in various scenarios offered by Rust, and see that the overhead of CPU feature detection can be non-trivial. I’ll then describe various ways to reduce this overhead.

Lastly, I’ll present updated benchmarks on ARM of Horcrux, my Rust implementation of Shamir’s Secret Sharing, and see how they compare to Intel.]]>
9d56dab2-f727-4758-8bc9-3f6270126c39Sat, 7 Jan 2023 04:33:31 +0000Is coding in Rust as bad as in C++?https://quick-lint-js.com/blog/cpp-vs-rust-build-times/strager
I've heard the same thing about Rust: build times are a huge problem. But is it really a problem in Rust, or is this anti-Rust propaganda? How does it compare to C++'s build time problem? ]]>
35c94deb-6622-4243-9d90-3ef4bbd425b2Wed, 30 Nov 2022 23:12:51 +0000How much does Rust's bounds checking actually cost?https://blog.readyset.io/bounds-checks/Griffin Smith1c3b0c68-19f1-4862-a78c-871c72af49c5Fri, 25 Nov 2022 00:09:03 +0000Safely writing code that isn't thread-safehttp://cliffle.com/blog/not-thread-safe/Cliff L. Biffle
But I’d like to tell you about the other side of Rust, which I think is under-appreciated. Rust enables you to write programs that are not concurrent. This feature is missing from most other languages, and is a source of much complexity and bugs.]]>
71899e08-d8b2-439c-8f13-28f00a37eecfThu, 21 Jan 2021 07:03:57 +0000Rustdoc performance improvementshttps://blog.rust-lang.org/inside-rust/2021/01/15/rustdoc-performance-improvements.htmlJoshua Nelson and Guillaume Gomez
> The performance comparison between @rustlang rustdoc now and rustdoc 4 months ago are crazy! The rustdoc cleanup going on (we're still far from done!) is having a huge positive impact! Can't wait to see how much better the results will be. Maybe I should write a blog post? pic.twitter.com/XapdmdZ1IZ — Guillaume Gomez (@imperioworld_) January 13, 2021

The tweet received a lot of comments approving the blog post idea so here we go!]]>
8d5a5ec1-0141-4745-8e5f-b4a6253e471fWed, 11 Nov 2020 22:03:44 +0000Exploring PGO for the Rust compilerhttps://blog.rust-lang.org/inside-rust/2020/11/11/exploring-pgo-for-the-rust-compiler.htmlMichael Woeristerc8b1a205-d11b-4028-b283-fe1dbcbd495bWed, 4 Nov 2020 23:52:51 +0000Introducing Scipio - a Thread-per-Core Crate for Rust & Linuxhttps://www.datadoghq.com/blog/engineering/introducing-scipio/Glauber Costa2546718d-18e3-45de-a1cc-602af5faa863Mon, 14 Sep 2020 11:04:15 +0000What I Learnt from Benchmarking Http4k, Ktor (Kotlin) and Actix v2, v3 (Rust) Microserviceshttps://matej.laitl.cz/bench-rust-kotlin-microservices/Matěj Laitleb7067aa-7992-4f03-aa81-8930012d664eSat, 29 Aug 2020 10:57:38 +0000Multiple Thread Pools in Rusthttps://pkolaczk.github.io/multiple-threadpools-rust/Piotr Kołaczkowski676b9910-2a87-43f2-8823-548bbbbe7f57Mon, 24 Aug 2020 09:59:15 +0000Profiling Doesn't Always Have To Be Fancyhttps://justanotherdot.com/posts/profiling-doesnt-always-have-to-be-fancy.htmlRyan James Spencerc718b737-9164-48a4-9707-cf8ccbac2019Mon, 24 Aug 2020 09:41:03 +0000As above, so below: Bare metal Rust generics 1/2https://www.ecorax.net/as-above-so-below-1/Pablo Mansanet
When it comes to the tools of our trade, many of them are curious and experimental. Some of them—very much myself included—explore far enough to leave pragmatism behind and veer into idealism, stubbornly forcing beautiful round pegs into industrial square holes. Hey, maybe they're square for a reason, but it doesn't hurt to try.

The majority of them aren't like that. Your average battle-tested firmware developer has accrued a healthy distrust of the abstract, probably born of watching shiny platonic constructs crash and burn with painfully real and concrete error traces. It is sobering, having to chase a hardfault on a tiny MCU across enough vtables and templated code to make Herb Sutter puke angle brackets. No wonder modern approaches are met with some resistance unless the LOADs and the STOREs are in clear view.

I felt this way too when someone suggested to me, back in 2014, that an up-and-coming language called Rust showed promise in the embedded field. Surely not, I thought, too high level. Even though I had been playing with it already, my profoundly ingrained bit-twiddling instincts told me not to trust a language that supported functional programming, or one that dared to have an opinion on how I managed my memory. Bah! That's how you get philosophers to run out of forks, and your forks to turn into SIGSEGVs.

I was wrong.]]>
76e0a4f7-7017-4bc1-a369-9de7a894bc11Thu, 13 Aug 2020 09:52:14 +0000 The Rust compiler isn't slow; we arehttps://blog.kodewerx.org/2020/06/the-rust-compiler-isnt-slow-we-are.html?m=1Jay Oster
I've been learning and using Rust for nearly four and a half years, since version 1.6. That's a good amount of time to become familiar with some of the troubles of the language, the tooling, and the ecosystem. But this is a slightly different story, this is a dissent to a common criticism that the compiler is slow. In this discussion, I will argue that these claims are misleading at best.]]>
3ce1ce3d-ecaf-4fab-ae75-dcf19c8986ddThu, 13 Aug 2020 09:48:03 +0000How Rust Lets Us Monitor 30k API calls/minhttps://blog.bearer.sh/how-rust-lets-us-monitor-30k-api-calls-min/Cédric Fabianskif58142f6-c824-43d6-9472-66d38ed0d90bTue, 11 Aug 2020 10:36:56 +0000sled theoretical performance guidehttps://sled.rs/perfTyler Neely
Stay tuned for follow-up articles that will drill into hardware and more Rust-specific techniques.]]>
68bd7581-c17b-48d8-9afb-8d0bb9dd6e84Mon, 10 Aug 2020 10:33:50 +0000What Is The Minimal Set Of Optimizations Needed For Zero-Cost Abstraction?https://robert.ocallahan.org/2020/08/what-is-minimal-set-of-optimizations.htmlRobert O'Callahanee13f500-c45e-4db5-96b5-46819332f624Thu, 6 Aug 2020 10:11:26 +0000Parallel stream processing with Rayonhttps://morestina.net/blog/1432/parallel-stream-processing-with-rayonHrvoje6ee23cba-f757-45b7-a9cb-ff5bad1e31f7Wed, 5 Aug 2020 03:48:41 +0000How to speed up the Rust compiler some more in 2020https://blog.mozilla.org/nnethercote/2020/08/05/how-to-speed-up-the-rust-compiler-some-more-in-2020/Nicholas NethercoteWeekly performance triage

First up is a process change: I have started doing weekly performance triage. Each Tuesday I have been looking at the performance results of all the PRs merged in the past week. For each PR that has regressed or improved performance by a non-negligible amount, I add a comment to the PR with a link to the measurements. I also gather these results into a weekly report, which is mentioned in This Week in Rust, and also looked at in the weekly compiler team meeting.

The goal of this is to ensure that regressions are caught quickly and appropriate action is taken, and to raise awareness of performance issues in general.]]>
50fecc4b-2d20-48ed-b877-bd3554875c84Mon, 27 Jul 2020 09:33:15 +0000Performance Comparison: Rust vs PyO3 vs Pythonhttps://towardsdatascience.com/performance-comparison-rust-vs-pyo3-vs-python-6480709be8d?source=rss------rust-5Marshal SHI4f3361ae-8a7b-4ed6-a17b-e9886b76e380Mon, 27 Jul 2020 09:29:16 +0000An introduction to Data Oriented Design with Rusthttp://jamesmcm.github.io/blog/2020/07/25/intro-dod/James McMurray
In this post we will cover 4 cases, using criterion for benchmarking.]]>
c19bebc8-4ce4-42e9-b09a-c348c294b5b5Thu, 16 Jul 2020 02:06:11 +0000Rewriting FORTRAN Software In Rusthttps://mckeogh.tech/post/shallow-water/Ferdia McKeogh
Forewarning: I have essentially zero domain knowledge in this project (and fluid dynamics simulation isn’t exactly the kind of topic you can catch up to research level on over a weekend) so I approached this project from a purely software engineering perspective. As for my Rust experience, I’ve been using it for personal projects since ~2016 and I worked as a Rust software engineer at a startup in Berlin for a year after leaving high school.]]>
5cb24aec-bf96-4597-9a52-2aa00aabbe85Wed, 15 Jul 2020 22:51:16 +0000Building and debugging a high-throughput daemon in Rusthttps://brokenco.de/2020/07/15/high-throughput-in-rust.htmlR. Tyler Croyb768ddc2-3b59-45fb-a7b0-da8e5bf8bedcMon, 13 Jul 2020 13:06:42 +0000nnnoiseless: porting audio code from C to rusthttps://jneem.github.io/nnnoiseless/Joe Neemanbinding.]]>f1f20543-7b61-4ff0-b927-f20fa258c6dcSun, 12 Jul 2020 23:54:57 +0000Faster Integer Parsinghttps://kholdstare.github.io/technical/2020/05/26/faster-integer-parsing.htmlIvan Thamfd6313d5-675e-41ac-b6f8-5c8b40e22c65Sat, 11 Jul 2020 22:57:30 +0000Target Feature vs Target CPU for Rusthttps://www.nickwilcox.com/blog/target_cpu_vs_target_feature/Nick Wilcox
There is a related compiler flag target-cpu we didn’t touch on, so it’s worth taking a look at how it affects the generated code. ]]>
d6cdbdeb-11a0-424d-ba08-faba2eea8514Thu, 9 Jul 2020 07:45:05 +0000Simd By Cheatinghttps://vorner.github.io/2020/06/21/simd-by-cheating.htmlMichal Vaner
If you don’t care about the chatter and just want to use it, it’s called slipstream and is available on crates.io. It’s an early release and will need some more work, but it can be experimented with (it has documentation and probably won’t eat any kittens when used). If you want to help out, scroll down to see what needs help (or decide on your own what part needs improving 😇).]]>
2dac72a2-ccc8-45d4-900b-dc37eeeb62e2Sat, 27 Jun 2020 10:28:13 +0000Faster Rust development on AWS EC2 with VSCodehttps://dev.to/rimutaka/faster-rust-development-on-aws-ec2-with-vscode-4hnoMax
It's not that I dread build failures or compiler warnings - I dread the wait.

My current Rust project takes about a minute to build on my laptop. It's not long enough to do something meaningful, like read HackerNews, but is long enough to make it feel agonizingly boring. If I don't have the money for a faster laptop, maybe I could build a really fast Rust development server on AWS?]]>
74efe0f2-d80d-4260-92b8-fc54cb9448a4Tue, 23 Jun 2020 21:58:46 +0000Tips for Faster Rust Compile Timeshttps://endler.dev/2020/rust-compile-times/Matthias Endlerc66f6f58-7329-4169-bc5f-cd3906669fe1Fri, 12 Jun 2020 01:51:00 +0000Efficiently escaping strings using Cow in Rusthttps://fullstackmilk.dev/efficiently_escaping_strings_using_cow_in_rust/Sam Rowe9eb80442-c506-4b29-a65c-10c243e7944fSun, 31 May 2020 00:58:14 +0000Rust Disassambly: part 1https://giordi91.github.io/post/disassemlbyrust1/Marco Giordano82156804-60b3-4431-877f-bc89985969bfSun, 31 May 2020 00:19:01 +0000Auto-Vectorization for Newer Instruction Sets in Rusthttps://www.nickwilcox.com/blog/autovec2/Nick Wilcox
That was true for way we wrote and compiled our code in that article, but we're going to expand beyond that. There is a progression of SIMD instruction families, with new releases of CPU's from Intel and AMD supporting new instructions we can use to increase the performance of our code.

If our goal is to get the best performance we need to take advantage of all the possible SIMD instructions on our hardware.

In this article we're going to:

* Look at the compiler output when targeting the different SIMD instruction set families.
* Benchmark the different instruction sets.
* Look at how we can structure our Rust code to support compiling for multiple instruction sets and then selecting at runtime the one to use. ]]>
dad8daef-2f11-440d-b9d4-c8938423da91Thu, 21 May 2020 22:14:46 +0000Taking Advantage of Auto-Vectorization in Rusthttps://nickwilcox.github.io/blog/autovec/Nick Wilcox We're going to take one small piece of audio processing code and take a look at how we can optimize it in Rust. Along the way we're going to learn about optimisation using Single Instruction Multiple Data CPU instructions, how to quickly check the assembler output of the compiler, and simple changes we can make to our Rust code to produce faster programs.]]>d4efcf4e-987d-4304-b60c-8bc1a9e55047Thu, 21 May 2020 22:07:02 +0000Rust: Dropping heavy things in another thread can make your code 10000 times fasterhttps://abramov.io/rust-dropping-things-in-another-threadAaron Abramov96577fd8-0fbe-4f90-bcf8-dd5acef2fb8cFri, 1 May 2020 01:54:43 +0000Reducing the size of a Rust GStreamer pluginhttps://www.collabora.com/news-and-blog/blog/2020/04/28/reducing-size-rust-gstreamer-plugin/Guillaume Desmottes
GStreamer is used extensively at Collabora to help our clients to build embedded multimedia solutions. With Rust gaining traction among the GStreamer community as an alternative to C to write GStreamer applications and plugins, we began wondering if the size of such Rust plugins would be a problem for embedded systems, and what could be done to reduce sizes as much as possible.

Inspired by this Tiny Rocket analysis and the Minimizing Rust Binary Size repository, here are the different strategies we tried to reduce the size of a minimal Rust GStreamer plugin.]]>
095e8bdb-289f-4517-91c6-fc018d839acfMon, 27 Apr 2020 10:59:22 +0000How to speed up the Rust compiler in 2020https://blog.mozilla.org/nnethercote/2020/04/24/how-to-speed-up-the-rust-compiler-in-2020/Nicholas Nethercote6df6fab9-35aa-464d-ac9f-7ab6324b77b7Wed, 15 Apr 2020 22:13:17 +0000Better stack fixing for Firefoxhttps://blog.mozilla.org/nnethercote/2020/04/15/better-stack-fixing-for-firefox/Nicholas Nethercoteb8acec30-3395-483a-aa1f-5774efb28684Mon, 13 Apr 2020 22:17:06 +0000Measuring build timings with mathbenchhttps://bitshifter.github.io/2020/04/12/mathbench-build-timings/Cameron Hart
Thus one of my goals when writing glam was to ensure it was fast to compile. Rust compile times are known to be a bit slow compared to many other languages, and I didn’t want to pour fuel on to that particular fire.

As part of writing glam I also wrote mathbench so I could compare performance with similar libraries. I also always wanted to include build time comparisons as part of mathbench and I’ve finally got around to doing that with a new tool called buildbench.]]>
3a49b05f-1443-45eb-b404-575b8f8dfe1bWed, 1 Apr 2020 06:51:14 +0000SIMD Array-of-Structures-of-Arrays in nalgebra and comparison with ultraviolethttps://www.rustsim.org/blog/2020/03/23/simd-aosoa-in-nalgebra/Sébastien Crozet80953f60-6548-4fef-ab9b-7e3768ce7d84Mon, 30 Mar 2020 23:46:49 +0000Reducing memory consumption in librsvg, part 4: compact representation for Bézier pathshttps://people.gnome.org/~federico/blog/reducing-memory-consumption-in-librsvg-4.htmlFederico Mena Quintero28372bae-b190-4832-bf8d-a3f068cb6319Fri, 27 Mar 2020 01:43:01 +0000pa'i Benchmarkshttps://christine.website/blog/pahi-benchmarks-2020-03-26Christine Dodrill
Benchmarking WebAssembly implementations is slightly hard. A lot of existing benchmark tools simply do not run in WebAssembly as is, not to mention inside the Olin ABI. However, I have created a few tasks that I feel represent common tasks that pa’i (and later wasmcloud).]]>
99879da7-fa47-439b-979b-f5fa6ab46542Thu, 26 Mar 2020 06:31:13 +0000Quickly Find Rust Program Bottlenecks Online Using a Go Toolhttps://pingcap.com/blog/quickly-find-rust-program-bottlenecks-online-using-a-go-tool/Ke'ao Yang
Because pprof-rs uses the same data format as the Go tool pprof, we can use pprof, to visualize TiKV's profiling data. This makes it easier for developers and online users to find TiKV's performance bottlenecks.]]>
073ebf61-d5aa-4fda-a1ff-72edec6025b1Wed, 25 Mar 2020 12:08:36 +0000Reducing memory consumption in librsvg, part 3: slack space in Bézier pathshttps://people.gnome.org/~federico/blog/reducing-memory-consumption-in-librsvg-3.htmlFederico Mena Quintero, that is, specifications for Bézier paths.]]>ef51c852-de43-4f66-83dc-ac1f149a53f8Fri, 20 Mar 2020 22:00:00 +0000Reducing memory consumption in librsvg, part 2: SpecifiedValueshttps://people.gnome.org/~federico/blog/reducing-memory-consumption-in-librsvg-2.htmlFederico Mena Quintero5b1ccf46-cddd-4259-ab10-d50efbaf6b16Tue, 17 Mar 2020 10:34:59 +0000Building Mender-Rust in Yocto, and minimizing the binary sizehttps://mender.io/blog/building-mender-rust-in-yocto-and-minimizing-the-binary-sizeOle636eb2ce-c901-49b2-88c3-2e43905e46c5Sun, 15 Mar 2020 10:49:37 +0000Optimizations That Aren't, Or Are They?http://oribenshir.github.io/afternoon_rusting/blog/copy-on-writeOri Ben-Shir
The blog was written by Herb Sutter, more than 20 years ago, and you can find it here. Before discussing the blog and why it is still relevant, more than 20 years later, we need some background. It describes an optimization known as Copy-On-Write, abbreviated as COW. I’m going to cover this optimization both in Rust and C++.]]>
926dd8be-8c58-4456-ab3e-d42981fa68a7Fri, 13 Mar 2020 22:56:32 +0000Reducing memory consumption in librsvg, part 1: text nodeshttps://people.gnome.org/~federico/blog/reducing-memory-consumption-in-librsvg-1.htmlFederico Mena Quintero468cc801-0fbc-4903-b546-f8d14c6edf36Thu, 5 Mar 2020 22:04:09 +0000Cheap tricks for high-performance Rusthttps://deterministic.space/high-performance-rust.htmlPascal Hertleif
Please remember that the following suggestions do not replace actual profiling and optimizations! I also think it goes without saying that the only way to detect if any of this helps is having benchmarks that represent how your application behaves under real usage.]]>
6c52ae3e-84d5-4953-b751-908757306587Wed, 4 Mar 2020 07:02:16 +0000The Cost of Indirectionhttps://www.joshmcguigan.com/blog/cost-of-indirection-rust/Josh Mcguigan9b3ade24-5f70-4f60-9ac7-e1bca57c92c5Wed, 4 Mar 2020 06:46:25 +0000Multithreaded Rust on Threadripperhttps://blog.licenser.net/2020/01/multithreaded-rust-on-threadripper/Heinz N. Gies886fbf10-4d8e-460c-9e54-dd37d9a49796Wed, 4 Mar 2020 06:45:01 +0000ExpressJS vs Actix-Web. It is exactly what you thinkhttps://medium.com/@maxsparr0w/performance-of-node-js-compared-to-actix-web-37f20810fb1aMaxim Vorobjov0545119f-625c-4a54-ae1b-e950688cf467Fri, 28 Feb 2020 23:09:18 +0000Why is swc fast?https://swc-project.github.io/blog/2020/02/16/why-is-swc-fast.htmlDongYoon Kange206215f-472b-4c75-aebc-35b030fac484Wed, 26 Feb 2020 21:34:06 +0000Low-overhead Parallelisation in Games Part 2, Allowing Side Effectshttps://github.com/avl/multi_iterate_mut/blob/master/Part2.mdAnders Musikka
In this part we're looking at making it possible to update data in some other vector while traversing the first vector.

This is harder than it looks, since we can't just allow the parallel threads to update the auxiliary vectors. If we do, there will be races, unless we somehow know that different threads won't ever update the same item.]]>
9a8894e7-9695-4f19-b757-db2c7de4faeeMon, 17 Feb 2020 10:19:53 +0000Low-overhead Parallelisation in Gameshttps://github.com/avl/multi_iterate_mut/blob/master/README.mdAnders Musikka
There are three types of objects: Intersections, Roads, Cars.

Intersections have red lights, and alternately admit cars from different roads into the intersection. When a car arrives at its destination, the car object is updated changing its state from 'on road' to 'idle'.

The gist of it is that calculations are done for each intersection, and for each intersection the calculation may yield an update to a road or a car. There are hundreds of thousands of intersections, about the same number of roads, and a million cars. Calculations need to be quick, so we should run as parallel as possible.]]>
09baf646-265d-4444-a9ef-473695511f7eThu, 13 Feb 2020 08:57:53 +0000Steps I take when optimizing the Rust compilerhttps://github.com/rust-lang/rust/pull/69050#issuecomment-585508353Nicholas Nethercote09b9e21f-63d9-4f84-be78-17cf614d6030Mon, 10 Feb 2020 09:38:34 +0000Zero-cost abstractions in Rusthttps://carette.xyz/posts/zero_cost_abstraction/Antonin CaretteUnfortunately, except for a subpart of the article, this article did not reflect, in my own opinion, correctly what are zero-cost abstractions.

Indeed, zero-cost abstractions, or “zero-overhead”, can be difficult to understand and to separate from other compiler optimizations, and can be easily misunderstood.

In this blog article, I discuss about this specific feature, and give you an example of how Rust is using it to deliver optimized code of your abstracted projects.]]>
d7ffe16e-b489-4eaa-9b02-c3883131e552Mon, 10 Feb 2020 09:25:27 +0000Rust zero cost abstractions in actionhttps://idursun.com/posts/rust_zero_cost_abstractions_in_action/Ibrahim Dursun
This piqued my interest in looking into what kind of assembly code is being generated in the final binary.]]>
549193c2-4fea-4d02-aa99-7fdb074e03a4Mon, 10 Feb 2020 09:24:32 +0000Rust memory optimizationhttps://simblob.blogspot.com/2020/02/rust-memory-optimization.htmlAmit Patel9c357bee-b59b-4197-b9d7-345415d62835Wed, 5 Feb 2020 08:59:17 +0000How I sped up my Rust program: From 30+ minutes to a few secondshttps://medium.com/@niklasbuechner/how-i-sped-up-my-rust-program-from-30-minutes-to-a-few-seconds-32a00509c7eNiklas Büchner94854c87-d770-4aea-86cd-bf20d5563120Wed, 5 Feb 2020 08:45:26 +0000Export Rust functions to Java using JNI (WebAssembly comparison) https://vegapit.com/article/export-rust-java-jni-webassembly-comparisonVegapitb6d87229-69ba-4179-a11e-42e808b9975bWed, 5 Feb 2020 08:32:03 +0000500K pps with tokiohttps://dwarfhack.com/posts/tech/tokio_pps/Marco Amann310e8876-fabb-44e1-acd3-1a5016b1473dTue, 4 Feb 2020 21:11:02 +0000Why Discord is switching from Go to Rusthttps://blog.discordapp.com/why-discord-is-switching-from-go-to-rust-a190bbca2b1fJesse Howarth9b52d7b0-1303-4a3b-91a8-eff19500f8d4Tue, 28 Jan 2020 08:59:22 +0000Optimizing loop heavy Rust codehttps://thaumant.me/optimizing-loop-heavy-rust/Ilia Schelokovbb1ad9aa-58bc-4c40-a9f2-98394494a5b5Sun, 19 Jan 2020 07:32:55 +0000How To Write Fast Rust Codehttp://likebike.com/posts/How_To_Write_Fast_Rust_Code.htmlChristopher Sebastian
Finally, after learning why my code was slow, I was able to boost performance 12000x, and my library was worthy of a new name: fasteval.]]>
84e85d32-6ba1-4ed8-bb39-b6259bb1ae92Fri, 17 Jan 2020 08:29:42 +0000Blocking Permithttp://gravitext.com/2020/01/13/blocking-permit.htmlDavid Kellum34ccf61b-5ce7-4d56-abb0-26690f35098aWed, 8 Jan 2020 10:33:27 +0000Profiling and Benchmarkinghttps://dev.to/luzero/profiling-and-benchmarking-167mLuca Barbato253c3593-8f2c-4f83-9a44-5231cda29189Mon, 6 Jan 2020 10:31:33 +0000Let The Compiler Do The Workhttp://cliffle.com/p/dangerust/6/Cliff L. Biffle
In this bonus section, I'll walk through how we'd write the program from scratch in Rust. In particular, I'm going to rely on compiler auto-vectorization to produce a program that is shorter, simpler, portable, and significantly faster... and without any unsafe.

Can it be?]]>
2869ef4b-f831-482c-a8fb-10705a298ad2Sun, 5 Jan 2020 00:31:12 +0000Mutexes Are Faster Than Spinlockshttps://matklad.github.io//2020/01/04/mutexes-are-faster-than-spinlocks.htmlAleksey Kladov
This is a followup to the previous post about spinlocks. The gist of the previous post was that spinlocks has some pretty bad worst-case behaviors, and, for that reason, one shouldn’t blindly use a spinlock if using a real mutex or avoiding blocking altogether is cumbersome.

In the comments, I was pointed to this interesting article, which made me realize that there’s another misconception, "For short critical sections, spinlocks perform better".

Until today, I haven’t benchmarked any mutexes, so I don’t know for sure. However, what I know in theory about mutexes and spinlocks makes me doubt this claim, so let’s find out.]]>
b24c2b27-455f-4100-b9d3-ad84dfa8cfeeThu, 2 Jan 2020 07:05:33 +0000Spinlocks Considered Harmfulhttps://matklad.github.io//2020/01/02/spinlocs-considered-harmful.htmlAleksey Kladov
Specifically, I’ll talk about:

- spinlocks,
- spinlocks in Rust with #[no_std],
- priority inversion,
- CPU interrupts,
- and a couple of neat/horrible systemsy Rust hacks.

]]>
7798ccb4-67fb-4332-aaca-7b117ced7e34Sat, 28 Dec 2019 00:47:09 +0000Writing a seqlock in Rusthttp://pitdicker.github.io/Writing-a-seqlock-in-Rust/Paul Dicker
Let’s start with a skeleton of the implementation. This version has multiple problems and room for improvements, which we are going to explore next.]]>
ec0a54ee-8898-44c3-91f3-de1ccd9e428dThu, 26 Dec 2019 07:37:54 +0000rav1e 0.2.0https://dev.to/luzero/rav1e-0-2-0-21e2Luca Barbato2289d9be-9aad-4927-8ac5-54a40b43546cMon, 23 Dec 2019 22:33:26 +0000Client-side Observations about Web Service Technologies: Using Apache Benchhttps://medium.com/swlh/client-side-observations-about-web-service-technologies-using-apache-bench-c613e52df22Venkatesh-Prasad Ranganath
With the web service implementations in place, I evaluated them using an off-the-shelf benchmarking tool. This post documents the client-side observations from this evaluation.]]>
77c51b5a-9ab1-42a8-adef-b1c190221ff6Wed, 18 Dec 2019 20:55:16 +0000Bisecting Rust Compiler Regressions with cargo-bisect-rustchttps://blog.rust-lang.org/inside-rust/2019/12/18/bisecting-rust-compiler.htmlSantiago Pastorinocc113184-d486-4ceb-a6af-dfa3a6d13ea2Wed, 18 Dec 2019 09:16:27 +0000Another reason to have a look at Rusthttps://blog.katlex.com/blog/another-reason-to-have-a-look-at-rust Aleksei Lunacharskii2f77cc0a-4278-4f41-a320-425d78ae5299Sat, 14 Dec 2019 07:16:07 +0000Make Vim Python plugin 10x faster using Rusthttp://liuchengxu.org/posts/speed-up-vim-python-plugin-using-rust/Liu-Cheng Xu
Thanks to stewart/rff, the fzy Rust implementation is already good to go.

What I have to do is to wrap the Rust version fzy and replace the pure Python fzy in vim-clap with the generated Python dynamic module.

I did some tests laster, and found that the optimization result is very satisfying.

From pytest, Rust is 30x faster:]]>
150c4fcd-1c88-4f5c-b3d0-76ca4d8fd714Wed, 11 Dec 2019 11:28:56 +0000How to speed up the Rust compiler one last time in 2019https://blog.mozilla.org/nnethercote/2019/12/11/how-to-speed-up-the-rust-compiler-one-last-time-in-2019/Nicholas Nethercotea8982da9-144f-4c0b-9d12-62f6bb8939ecSat, 7 Dec 2019 22:19:50 +0000Tiny Windows executable in Rusthttps://www.codeslow.com/2019/12/tiny-windows-executable-in-rust.htmlJani Peltonen
One of the main challenges in writing a 64K intro is to squeeze all the code and assets into 64K of memory. There are several tiny frameworks written in C++ that set up a Windows app with a modern OpenGL context. I could not find anything similar for Rust so I decided to create the smallest possible bare bones app that does just that.]]>
7dfc42bd-03b3-4f8d-9d72-051eb69a8237Tue, 3 Dec 2019 10:28:41 +0000Taking ML to production with Rust: a 25x speeduphttps://www.lpalmieri.com/posts/2019-12-01-taking-ml-to-production-with-rust-a-25x-speedup/Luca Palmieri3e846aff-b044-405c-9d92-3c7083e629b8Mon, 2 Dec 2019 06:58:00 +0000rav1e and gains on ARM Deviceshttps://mindfreeze.videolan.me/blog/rav1e-and-gains-on-arm-devicesmindfreeze
In the end, we are getting around ~12-20% Improvement in Encoding Time and FPS which is the first step making adoption of AV1 to Mobile devices. It is also very important to note that we’ve been using what SIMD code we have rather than proceeding in the order of lowest-hanging fruit. The relative gains would be more impressive if the outstanding functions were optimized first. Our priority was proving the infrastructure for merging, testing and benching on ARM Devices feasible and now it's more realistic. ]]>
2de8fbcd-1a56-4eea-8f6d-54cb843418e2Sat, 9 Nov 2019 00:00:00 +0000Tutorial: Profiling Rust applications in Docker with perfhttps://gendignoux.com/blog/2019/11/09/profiling-rust-docker-perf.htmlGuillaume Endignoux48cf21ce-5244-4667-82c3-9c54bb469bbfThu, 7 Nov 2019 03:15:40 +0000Battle of the Serverless — Part 2: AWS Lambda Cold Start Timeshttps://medium.com/@shouldroforion/battle-of-the-serverless-part-2-aws-lambda-cold-start-times-1d770ef3a7dcMark Fowler9e49b1b3-2b2a-46f0-951e-bda659adca6eThu, 7 Nov 2019 00:00:00 +0000Comparing parallel Rust and C++https://parallel-rust-cpp.github.io/Matias Lindgrena251550c-42ad-42d6-8780-eae69e3bc85fFri, 1 Nov 2019 07:00:00 +0000Always Bump Downwardshttps://fitzgeraldnick.com/2019/11/01/always-bump-downwards.htmlNick Fitzgerald7eda1c5a-b463-4d8b-a024-68fe21c735d0Wed, 30 Oct 2019 07:07:06 +0000“Beating C” with 120 Lines of Rust: wchttps://medium.com/@martinmroz/beating-c-with-120-lines-of-rust-wc-a0db679fe920Martin Mrozca9e7e60-b2dd-4481-9d5b-82a5936d8d9cWed, 23 Oct 2019 02:26:17 +0000FastSpark: A New Fast Native Implementation of Spark from Scratchhttps://medium.com/@rajasekar3eg/fastspark-a-new-fast-native-implementation-of-spark-from-scratch-368373a29a5cRaja Sekar5babdb55-5061-4e26-b05e-a7c407d03c80Tue, 22 Oct 2019 13:00:00 +0000Where rustc spends its timehttps://wiki.alopex.li/WhereRustcSpendsItsTimeSimon Heath59f60adc-9c66-4f8b-9a3a-6ffdcedb14c6Sun, 20 Oct 2019 00:00:00 +0000Rust Big Data Benchmarkshttps://andygrove.io/rust_bigdata_benchmarks/Andy Grovece96a1d5-014d-41ed-b997-45c0449aed59Sat, 19 Oct 2019 23:59:59 +0000Rust and C++ on Floating-point Intensive Codehttps://www.reidatcheson.com/hpc/architecture/performance/rust/c++/2019/10/19/measure-cache.htmlReid Atcheson97ca4165-4f8c-4c57-872d-e5986df0c7eeSun, 13 Oct 2019 00:00:00 +0000Making the Tokio scheduler 10x fasterhttps://tokio.rs/blog/2019-10-scheduler/Carl Lerche67d3364b-64e1-4c9e-bf5c-93ed324c8f4aThu, 10 Oct 2019 23:01:52 +0000How to speed up the Rust compiler some more in 2019https://blog.mozilla.org/nnethercote/2019/10/11/how-to-speed-up-the-rust-compiler-some-more-in-2019/Nicholas Nethercote20e74694-1d5e-4315-9af9-b9efe6721eccThu, 10 Oct 2019 03:30:17 +0000Speeding Up Rust Builds: Code-Gen Editionhttps://epage.github.io/blog/2019/10/speeding-up-rust-builds-code-gen-edition/Ed Page7fafbd3e-01e8-46ad-9dcf-3aca241030b7Wed, 9 Oct 2019 23:34:50 +0000Visualizing Rust compilationhttps://blog.mozilla.org/nnethercote/2019/10/10/visualizing-rust-compilation/Nicholas Nethercote9058ab44-792b-4652-a06a-db4ada3e0ff5Tue, 8 Oct 2019 00:10:38 +0000Dev Time Optimization -- Part 1 (1.9x speedup, 65% less disk usage)https://azriel.im/will/2019/10/08/dev-time-optimization-part-1-1.9x-speedup-65-less-disk-usage/Azriel Hoh
Build and test duration in release mode reduced from 23 minutes to 13 minutes . Debug artifact disk usage reduced from 20 G to 7 G (65% reduction, fresh build), or 230 G to 50 G (78% reduction, ongoing development) Background The rate of software development is affected by many limits.]]>
87600fb3-40d3-403e-87b7-25a3a2eacdcfSat, 28 Sep 2019 00:00:00 +0000Binary Format Shootouthttps://speice.io/2019/09/binary-format-shootout.htmlBradlee Speice6090f016-cbc0-48bd-b448-c2dd82f721b2Wed, 25 Sep 2019 00:00:00 +0000Causal Profiling Rust Codehttps://llogiq.github.io/2019/09/25/coz.htmlLlogiqd7a12b5f-ab52-4e4b-b752-7d857e9f86bfFri, 20 Sep 2019 00:00:00 +0000Of bitpacking, with or without SSE3https://fulmicoton.com/posts/bitpacking/Paul Masurelf6562f73-5770-4c71-9aad-ef1f08727f58Thu, 19 Sep 2019 00:00:00 +0000Closing the gap: cross-language LTO between Rust and C/C++http://blog.llvm.org/2019/09/closing-gap-cross-language-lto-between.html?m=1Michaelc14e5bd8-c28e-46c1-99dc-d3a7536ec661Mon, 16 Sep 2019 19:16:58 +0000An unexpected performance regressionhttps://dev.to/sharkdp/an-unexpected-performance-regression-11aiDavid Peter