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

  • Home
  • SEARCH
  • 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 8090979
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:54:27+00:00 2026-06-05T19:54:27+00:00

Quick question, has anyone done a benchmark on random number generation between javascript and

  • 0

Quick question, has anyone done a benchmark on random number generation between javascript and php? I’m not talking about 4-5 random function calls but on a large scale, I’m more interested about speed rather than better random numbers.

  • 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-05T19:54:28+00:00Added an answer on June 5, 2026 at 7:54 pm

    As Alan pointed out, the performance of JavaScript’s random numbers depends on the resources the client-side brings to the party. However, there are a few more things to consider:
    Since you’re looking for random numbers, generated on a large scale, it is important to note that browsers may stop your JavaScript from reaching the end of a loop. Some browsers might assume the script contains a deadlock somewhere and ask the user to stop or debug the script.
    In addition to this, the numbers will only be generated as long as the client is on the page and has JavaScript enabled.

    On PHP, there are two things to consider (apart from server hardware). If you’re really planning on generating vast quantities of random numbers, the response to your client will be slowed down, too. Though PHP is faster then JavaScript (by far), it’s no good to have your visitors wait too long for a response from the server.
    A possible solution might be to send the response out anyway and get the randomly generated numbers via ajax. Downside here is: you’ve lost the speed benefit of php.

    In your situation, I’d keep the random generator server side. Perhaps look into other languages to put together a little C programme if you’re really focused on speed and server load (PHP is resource expensive). But sticking to the tags, again: stick to php – after all, quite a lot of it is C anyways…

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

Sidebar

Related Questions

Hey just a quick question for anyone who has done this. I want to
Quick question about Wordpress PHP: I am writing a theme and I want to
Quick question if anyone has time to answer. The current query works great, but
A quick question to delegates. Lets say, CLASSA has a delegate defined: @protocol MyDelegate
Quick question, What have I done wrong here. The purpose of this code is
Hey guys I have a quick question, I have a dialog box that has
Quick question - is it possible to detect whether a focus has come from
I wanted to ask a quick question just to make sure I am not
Has anyone ever compiled a list of all the PHP functions/methods that send output
I hope this question has an obvious answer to anyone who knows his way

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.