If you have an enum in your application and you only have a few items, should you force the underlying type to be the smallest possible type?
enum smaller : byte { one, two, three };
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.
No. Don’t prematurely optimize unless you’ve proved with a profiler that it’s actually a problem.