Right, I really talk about bit arrays, aka "Bit string datatype"
In my code I need to summarize happened events (in boolean sense happened/NOT happened equal to 0/1).
My above VERY simple example you can understand as 10 events monitored in time of 50000 seconds.
event 1 would be - is sunny / is NOT sunny
event 2 would be - is rainy / is NOT rainy
event 3 would be - is windy / is NOT windy
event 4 would be - I am happy / I am NOT happy
event 10 would be - 'something' happened / 'something' NOT happened
And now I need only to know a numerical sum of happened events in any time moment, in each second, how much events happened
and store it in variable happenedX(50000) as result (with value range 0 to 10 in meaning 'None of 10 events happened'
to 'everything happened')
I made a tricky code - raw data 2D array (events,seconds)
Code: Select all
What(10,50000) as String*1 and HappenedX(50000) as integer
'summing is easy
for i= 0 to 50000
for j= 1 to 10
then show result HappenedX() in sensible diagram.That's all.
Problem is, this goes up to millions of seconds (increasing time) to hundreds megabytes array in memory.
After that computing such array in memory is significantly slow.
Therefore manipulating with bits ,assuming, would keep the computing speed on acceptable level.