Difference between revisions of "Disk space quota"

From Robowiki
Jump to navigation Jump to search
(Question about file size calculations)
 
(don't need char)
Line 6: Line 6:
 
It can seems a stupid question but if i'm right i'm impressed how easily i can store more than 15 weigth for every bot in rumble(and much more!), giving at my gun a chance to learn specific weigth for every bot (i think the gun will be really slow to learn, due to automatics weigth finding, but actually is under development)
 
It can seems a stupid question but if i'm right i'm impressed how easily i can store more than 15 weigth for every bot in rumble(and much more!), giving at my gun a chance to learn specific weigth for every bot (i think the gun will be really slow to learn, due to automatics weigth finding, but actually is under development)
 
--[[User:Lestofante|lestofante]] 15:20, 12 March 2009 (UTC)
 
--[[User:Lestofante|lestofante]] 15:20, 12 March 2009 (UTC)
 +
 +
If you know the length of a double, you actually don't need a char as a separator. Just read in doubles 64 bits at a time... it will save you disk space. You could probably use floats instead, which would be even better. An idea I had was putting the information into a long filename, so your actual filesize is 0 and doesn't contribute to the quota.--[[User:Skilgannon|Skilgannon]] 18:56, 12 March 2009 (UTC)

Revision as of 19:56, 12 March 2009

Little question: space for saving to file double is 64bit, one char 16bit. If i want to save the weigth for my gun i can store it to file using 1 double(weigth) and 1 char(separator), using 80bit (8 byte). 8 byte for 1000 robot is 8000 byte, and 200kb is maximum file quota (204800 byte) So for every bot in rumble i can save 204800/8000 = 25 weigth, right? If i use float(32 bit) i will gain about double space right? It can seems a stupid question but if i'm right i'm impressed how easily i can store more than 15 weigth for every bot in rumble(and much more!), giving at my gun a chance to learn specific weigth for every bot (i think the gun will be really slow to learn, due to automatics weigth finding, but actually is under development) --lestofante 15:20, 12 March 2009 (UTC)

If you know the length of a double, you actually don't need a char as a separator. Just read in doubles 64 bits at a time... it will save you disk space. You could probably use floats instead, which would be even better. An idea I had was putting the information into a long filename, so your actual filesize is 0 and doesn't contribute to the quota.--Skilgannon 18:56, 12 March 2009 (UTC)