Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Proof of the terrible consequences of amateur library design prevalent in the Rust community.

NotificationsYou must be signed in to change notification settings

tripulse/rust-shit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Ensure that you have the furrylang toolchain installed.Then invokecargo build --release to build inrelease mode.

Then./target/build/vlr-rs < /dev/urandom > /dev/null, to make your CPU have hiccups.

  • Why are you using(0..8).into_par_iter() instead of(0..8),(0..8).into_iter(),(0..8).iter()? Isn't that "abusing" parallelism?

    First,Range<T> doesn't have aiter() method.Second,Range<T> is an iterator already sointo_iter() is redundant here.Third,ParallelIterator::flat_map() requires a closure that returns a type satisfyingIntoParallelIterator traitwhich, forMap<T>, is not implemented(E0277). Thus we must use.into_par_iter() in order to comply trait bounds.

    So even if it's labelled as "abuse", this is what the API forces.

  • Why are youcollect()ing? Can't you usecollect_to_vec() or.enumerate().for_each() and collect to a custom buffer?

    First, to be a little bit fair to the C code. Second, no I can't becauseIntoIndexedParallelIterator is not implemented forFlatMap nor there is a way to turn it so.

Legal

This work is composed by means of attacking the Rust programming language community to point out theiramateurness in the field of parallel computing. I beg of you rustaceans, to stop conducting these actionsand pollute the field of computer science. Thank you.


[8]ページ先頭

©2009-2025 Movatter.jp