Forem

Corey Alexander
Corey Alexander Subscriber

Posted on • Originally published at coreyja.com on

String Interning

Today I learned about String Interning. Which is the process of taking a string and turning it into a number that you can use to represent that string. Its often used in cases where you might have a fixed number of strings, and want to perform things like equality checks quicker than doing string equality. You can map each string to a unique integer then do the equality check on the integer instead.

And even cooler I was actually familiar with the concept, just not the name! This is how Strings and Symbols work in Ruby! A Symbol is an 'interned string', that are often used as hash keys in Ruby. This is nice since we don't have to do string hashing on each hash lookup. Pretty neat!

Links:

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay