Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
for performance, what's the best variable type to use for boolean _TRUE & _FALSE ?
#1
(If it differs by OS or 64 vs 32-bit, I'm in 64-bit Windows 10/11.)

Since QB64PE doesn't have a dedicated boolean type and _TRUE/_FALSE are numbers -1 & 0, I usually just dim those variables as integer. 

However, I seem to recall someone saying, back in the days of QB64 2.0, that Long was the numeric type most "native" to QB64 under the hood, but I could be hallucinating that memory. 

Or what about _BYTE ? I would think _BYTE would be the logical choice. But I also recall reading that on a 64-bit CPU, the data type requiring the least wrangling under the hood is INTEGER64 - which would be an egregious waste of space for a boolean (unless one INTEGER64 could be repurposed somehow to store 64 booleans?)

Thoughts?
Reply


Messages In This Thread
for performance, what's the best variable type to use for boolean _TRUE & _FALSE ? - by madscijr - 09-20-2025, 06:47 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question Experimenting with a "StringList" type for simpler handling of string arrays/lists Heimdall 18 1,225 12-19-2025, 12:51 PM
Last Post: Heimdall
  performance drop on LINUX with PSET in v4.2 Herve 12 970 11-20-2025, 02:00 PM
Last Post: SpriggsySpriggs
  Loading from file into _MEM? and LEN a TYPE... Unseen Machine 9 975 08-03-2025, 02:55 AM
Last Post: SMcNeill
  Need help with boolean Petr 6 1,144 11-17-2024, 06:57 AM
Last Post: TempodiBasic
  QB64's TYPE / END TYPE inquiry MystikShadows 2 909 06-30-2024, 02:34 PM
Last Post: MystikShadows

Forum Jump:


Users browsing this thread: 1 Guest(s)