Table.getn() Deprecated?

Hey, I’m confused whether table.getn() is deprecated. After conducting some research, people are saying that it’s faster than using #, however that it’s deprecated.

It’s still in Roblox’s API Reference, though. Is this deprecated?

2 Likes

i guess # is faster because table.getn has to look up table and look up getn but # is an operator.

Also table.getn does not seem to be deprecated: Table (roblox.com)

2 Likes

I spoke to somebody regarding the efficiency of table.getn(), and they’re convinced that actually it’s more efficient than using # because of C backend?

I’m going to assume you’re right, since the official Roblox documentation likely doesn’t lie. Just confusing since some have said it is deprecated. I don’t see it used often in comparison to #

1 Like