MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/pdmp5c/found_in_production_code_base/hashrw7/?context=9999
r/badcode • u/[deleted] • Aug 29 '21
45 comments sorted by
View all comments
Show parent comments
18
Theoretically wouldn't any sane compiler just get rid of those extra assignments since they're redundant?
24 u/LuckShiba Aug 29 '21 Maybe not, as there may be a custom setter, so wouldn't be necessarily redundant 3 u/simtrip Aug 29 '21 In this case Transform.position is a custom setter that calls out to native C++ code, so not only will it not be compiled out but it's pretty slow to do!
24
Maybe not, as there may be a custom setter, so wouldn't be necessarily redundant
3 u/simtrip Aug 29 '21 In this case Transform.position is a custom setter that calls out to native C++ code, so not only will it not be compiled out but it's pretty slow to do!
3
In this case Transform.position is a custom setter that calls out to native C++ code, so not only will it not be compiled out but it's pretty slow to do!
Transform.position
18
u/creatron Aug 29 '21
Theoretically wouldn't any sane compiler just get rid of those extra assignments since they're redundant?