Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8586733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:22:59+00:00 2026-06-11T22:22:59+00:00

What is the absolute fastest way to hash a string in PHP? I have

  • 0

What is the absolute fastest way to hash a string in PHP?

I have read that md5 can be relatively slow but am unsure of the alternatives.

Basically, i have a function that i need to squeeze every last bit of performance possible out of and within that function i have a string say “yada yada yada” and i need it hashed in someway so it becomes one string.

I should note that security is no issue here – i simply need a single unique string representation, as its for a cache key.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T22:23:01+00:00Added an answer on June 11, 2026 at 10:23 pm

    The whole point of a hash is that it’s -not- fast. The faster the hash is the faster it can be cracked.

    By that logic, the less secure the hash is – the faster it’ll be. If you’re going to favour such logic I suggest you either stop what you’re doing or use encryption instead.

    In response to your update

    It sounds like you may want a CRC. Again it’s worth mentioning that typically the faster the check is the less combinations exist for the particular algorithm, and thus it’s less likely to be a “unique representation”.

    The associated PHP documentation can be found here: hash function with crc32/crc32b

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What would be the absolute fastest possible way to write a string to the
What is the absolute fastest way to read and write strings from a file
Which is the fastest way to implement an operation that returns the absolute value
Absolute beginner question: I have a template file index.html that looks like this: ...
Absolute mind blank on this. It's been one of those days. But I have
What's the absolute fastest way to format a full name? where the middlename and
I'm an absolute beginner, you see. Say I have a string object on the
I need the absoulute fastest way possible to validate an input string against a
Another absolute beginner here...I have built a page that geolocates the user and places
So I'm looking for the absolute, fastest way to perform the following: Load jQuery

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.