Skip to content

Add StringName #4169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 4, 2025
Merged

Add StringName #4169

merged 5 commits into from
May 4, 2025

Conversation

tederis
Copy link
Member

@tederis tederis commented Apr 19, 2025

This PR introduces CStringName class that is intended to optimize the interaction with Lua strings. This is the first PR related to element data optimizations. CStringName represents the idea that already exists in other game engines(FName in UE or StringName in Godot, for example) which in short consists in string caching(or interning). It gives us two benefits: less memory usage and fast operations(such as comparison or hash computation). These two will be intensively used in the next PR entirely dedicated to element data optimizations.

The discussion related to this: #3287 (comment)

tederis added 2 commits April 19, 2025 19:05
Lua based StringName

Use FromStringAndHash

Comments

Enable SharedUtil_Tests
@tederis tederis added the enhancement New feature or request label Apr 19, 2025
@Dutchman101 Dutchman101 merged commit 4929a83 into multitheftauto:master May 4, 2025
3 of 6 checks passed
MTABot pushed a commit that referenced this pull request May 4, 2025
4929a83 Add StringName / Lua ElementData optimizations (#4169)
@tederis tederis mentioned this pull request May 10, 2025
Xenius97 added a commit to Xenius97/mtasa-blue that referenced this pull request May 21, 2025
…o#4169)"

This reverts commit 4929a83.

# Conflicts:
#	vendor/lua/src/lstring.c
huncrys added a commit to huncrys/mtasa-blue that referenced this pull request May 31, 2025
huncrys added a commit to huncrys/mtasa-blue that referenced this pull request Jun 23, 2025
huncrys added a commit to huncrys/mtasa-blue that referenced this pull request Jul 8, 2025
huncrys added a commit to huncrys/mtasa-blue that referenced this pull request Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants