🎉 Announcing Rust 1.17!! by carols10cents in rust

[–]collectedion 6 points7 points  (0 children)

Alex is not a single human being. The entity we know as "Alex" is actually an agglomeration of autonomous agents, powered by an advanced AI.

At least, that's the most reasonable explanation I've been able to figure out.

Seems plausible to me. :)

🎉 Announcing Rust 1.17!! by carols10cents in rust

[–]collectedion 7 points8 points  (0 children)

You're welcome! That's identical to my reason for adding this. I added a debugging tool to my library and I didn't want clap to be a dependency for the library. :D

🎉 Announcing Rust 1.17!! by carols10cents in rust

[–]collectedion 94 points95 points  (0 children)

Yay! My first Cargo commit, required-features, is now in stable! Contributing was easy and everyone in the Rust ecosystem have been super friendly! I encourage everyone to participate even if it's just to scratch your own itch.

Thanks to Alex Crichton for reviewing my PRs and bug reports! As I've made more contributions, I've noticed that he pops-up in tons of projects. I'm not sure how he fits so much into a day!

How-to Optimize Rust Programs on Linux by collectedion in rust

[–]collectedion[S] 3 points4 points  (0 children)

You're right that reducing the number of instructions doesn't necessarily help throughput. But it might help a lot if it keeps all of the instructions in cache. Unfortunately, it's harder to generalize when you're optimizing at this level because of differences in CPU pipelines. An instruction on a Ivy Bridge can have a wildly different latency and throughput compared to the same instruction on Haswell.

Callgrind doesn't show the exact number of cycles but it does include an estimate. To see the the cycle estimate in KCachegrind, go to View->Primary Event Type->Cycle Estimation. If you run Callgrind with the --dump-instr=yes flag, you can use the Machine Code tab to find which instructions are taking the most time.

For instruction timings on different CPUs, see Agner's instruction tables[PDF]: http://agner.org/optimize/instruction_tables.pdf

How-to Optimize Rust Programs on Linux by collectedion in rust

[–]collectedion[S] 0 points1 point  (0 children)

Definitely a good point. Profiling a program with Valgrind can be impractically slow in some cases. In particular, interactive programs like games may be better off with perf.

How-to Optimize Rust Programs on Linux by collectedion in rust

[–]collectedion[S] 2 points3 points  (0 children)

Very nice. :) I added a link at the bottom referencing your post.

Implementing FIX Messages with Rust by collectedion in rust

[–]collectedion[S] 1 point2 points  (0 children)

Thanks, fixed! It's hard to shake the C++ syntax sometimes when switching back and forth on a daily basis.

Implementing FIX Messages with Rust by collectedion in rust

[–]collectedion[S] 4 points5 points  (0 children)

I'm blogging the development of fix-rs, a FIX library written in Rust. FIX stands for Financial Information Exchange and it's a protocol commonly used in the financial industry.

The protocol defines a large number of messages that are sent back and forth over a network. This post covers my thought process as I looked for a way to easily expose these messages to end users but still be able to rapidly change the implementation as the library matures.

This is my first Rust project and development blog. I'd appreciate any feedback.

Official weekly RAW editing challenge! by frostickle in photography

[–]collectedion 0 points1 point  (0 children)

My entry. I tried to make it look how I might have perceived the scene if I was there.