@pepsiman
For LUA I would calculate like this:
- each number [big, small, decimal, floating] - 8 bytes [64bit architecture]
- each string - number of letters + 8 bytes [to store length]
- each table - 8 bytes [to store number of child elements]
- 'objects' are just tables with some key-value pairs
If you define table in LUA script, you can check script size. It will be close to memory usage.
Storing table with size 1GB won't lag server.
It can only lag, if there is milion keys in one big table and you iterate over it with 'for'/'while'.
If there is 100 keys, each with 10MB value, it won't lag when you use 'for'/'while'.
When you read table by known key (number/string) execution time should be same: