The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Size of data types
Author Message
Monty
Apprentice
*

Posts: 40
Likes Given: 0
Likes Received: 2 in 2 posts
Joined: Jun 2012
Reputation: 1



Post: #1
Size of data types
Hi guys,
can somebody tell me how much memory takes vars,tags or list? What is better to use?

Is it takes same memory tag.test = "blabla" like this tag.test = "blablablbabl ablablbabla blablbablablablb ablablablbablablablba blablablba blablablba" ?

And is better to use SQLite to store data or not?

Like everytime sorry for my bad english and thx for answer.

C# application developer.
C/C++,SQL,PLSQL programming.
Oracle database / information system developer.
Cooperation for development of new shard.
01-07-2014 05:21 AM
Find all posts by this user Like Post Quote this message in a reply
Wap
Journeyman
*

Posts: 138
Likes Given: 6
Likes Received: 7 in 6 posts
Joined: Mar 2012
Reputation: 3

UORPG.net

Post: #2
RE: Size of data types
(01-07-2014 05:21 AM)Monty Wrote:  Is it takes same memory tag.test = "blabla" like this tag.test = "blablablbabl ablablbabla blablbablablablb ablablablbablablablba blablablba blablablba" ?
No.

(01-07-2014 05:21 AM)Monty Wrote:  Hi guys,
can somebody tell me how much memory takes vars,tags or list? What is better to use?
As I remember(if nothing was changed), 1 symbol in string-type TAGs = 1 byte. But number-type TAG weight = 4 bytes.
(This post was last modified: 01-07-2014 05:46 AM by Wap.)
01-07-2014 05:45 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Alaric
Journeyman
*

Posts: 227
Likes Given: 7
Likes Received: 9 in 4 posts
Joined: Oct 2012
Reputation: 7



Post: #3
RE: Size of data types
I'll try a quick answer. Correct me if I'm wrong.
If the tag/var/whatever contains only numbers its stored as a number.
If it contains some chars - comma, question mark, anything from alphabet, etc. It's stored in some shitty coding. Unicode, UTF8,16,32. In this case it should be common ASCII. So, 2 bytes(7 or 8bits) per char.

Logically, more letters means more memory. Even tags itself "shouldn't be" named like tag.the_most_awesome_person_in_the_world="me" but tag.bestperson="me".

Shorter = better but it must be understandable.
01-07-2014 05:48 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)