Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
cjhanks
· 6y ago · 0 comments
Doesn't this mean that a conditional branch is added to all existing code which performs casting?
Comments
[–]
oconnor663
6y ago
I think in the specific case of casting a float to an int, more instructions will be added, but it doesn't have to be a branch. Here it looks like rustc emits a conditional move:
https://godbolt.org/z/1cfqof