search for: bench_xor_1000_ints

Displaying 2 results from an estimated 2 matches for "bench_xor_1000_ints".

2015 Nov 06
4
[RFC] A new intrinsic, `llvm.blackbox`, to explicitly prevent constprop, die, etc optimizations
...ned and well supported solutions - > set up a pass manager that runs the passes you want) > > What is the something else? > > IE what is the problem that led you to consider this solution. > I apologize if I'm not being clear enough. This contrived example ```rust #[bench] fn bench_xor_1000_ints(b: &mut Bencher) { b.iter(|| { (0..1000).fold(0, |old, new| old ^ new); }); } ``` is completely optimized away. Granted, IRL production (ignoring the question of why this code was ever used in production in the first place) this optimization is desired, but here it leads to bogu...
2015 Nov 03
2
[RFC] A new intrinsic, `llvm.blackbox`, to explicitly prevent constprop, die, etc optimizations
On Mon, Nov 2, 2015 at 9:16 PM, Daniel Berlin <dberlin at dberlin.org> wrote: > I'm very unclear and why you think a generic black box intrinsic will have > any different performance impact ;-) > > > I'm also unclear on what the goal with this intrinsic is. > I understand the symptoms you are trying to solve - what exactly is the > disease. > > IE you say