Is NumberValue as performant as IntValue?

Question is in topic, i never tried to really answer this question, i looked at dev forum but there is no definitive answer, it would be very nice to use NumberValues and don’t loose more resources

If you ask why i need to use NumberValues only, i create data store pattern but all numbers have one type, and i can assign only one type of value to type of variable without creating special table for a lot of stats and data

Instances are usually very very inconsequential, and NumberValues are no different. All they do is act as a variable.

Also, you can use multiple Attributes on a single Instance instead of having multiple Instances.

Fairly certain any number in luau is going to be 8 bytes
From the NumberValue page

This stores a number in 64 bits (8 bytes)

From the IntValue page

An IntValue stores a single signed 64-bit integer

for memory purposes, they’re the same

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.