- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have to run a select to interpret a variable.
Actually the select case is based on character(len=10) variable, but I could substitute that with an integer.
If I did that, would I improve the speed of my code?
Pratically speaking, dealing with character vars slows the code?
Regards
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My first advice is to use whichever makes the program easier to understand. If you have analyzed performance and found the SELECT to be a bottleneck, then changing to integer may help because the compiler can better optimize that. I wouldn't waste any time on this, however, unless it was demonstrated to be a problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In fact I preferred using character, because it allows to better understand the meaning. Using an integer as an identification code would require a table to browser each time to guess what the code does.
I will follow your advice. Perhaps this is the last of my problem today.
Thanks
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page