Which cast is fastest in C#? Assume that I have a 64 bit floating point. Would it be faster to convert it to a 32 bit integer, or a 64 bit integer (assuming that data loss is not relevant to me)?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are several ways to find this out, each with their own advantages.
Me, I would opt for the first choice as a first run since it’s the easiest to do and doesn’t involve any third parties. Only if it were unclear would I move to the second method.
And I wouldn’t trust a third-party anyway unless they showed some evidence, and they might not get back to you before your homework deadline.