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 8216663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T12:12:34+00:00 2026-06-07T12:12:34+00:00

Iv looked around for a existing lib/solution for what I want but can’t find

  • 0

Iv looked around for a existing lib/solution for what I want but can’t find anything, so Im looking to do it myself, and looking for some pointers.

Im looking to create a javascript testing suite, to do a/b testing on two function, so lets just say I have

function foo(){ var x = new Object();}

and

function bar(){var x = {};}

I want to be able to measure the execution time, the memory usage and any other useful stats (like how benchmark can show operations per second)

What ways are there, using javascript, to measure the above

I know a few, but It would be nice to start from fresh and see what else is out there, so all suggestions are very much welcome

thanks

N.B Im not asking for browser plugins or chrome dev tools, the measuring needs to be done in js

  • 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-07T12:12:35+00:00Added an answer on June 7, 2026 at 12:12 pm
    var start = new Date().getTime();
    *Your Code*
    var end = new Date().getTime(),
        time = end - start,
        execs = 1000 / time;
    
    console.log('time in ms: '+time);
    console.log('operations per second: '+execs);
    

    No idea how you would get the memory usage of the execution…

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

Sidebar

Related Questions

I've looked around but have yet to find a great solution the the following
I looked around and can't find anything similar to what I need help with.
Looked around SO but couldn't find anything useful, so.. I have a Backbone.js contacts
I looked around and couldn't find it! Maybe I didn't look hard enough,but this
I've looked around and have bits and pieces but can't put the puzzle together.
I've looked around for a solution but it seems this is not a common
looked around here, but didn't find straightforward answer.. I'm using cookies, to store last
I've looked around and can't find any info on this. I've already built my
I looked around and I can't seem to find the proper way of sorting
I looked around on Stack Overflow and Agile Development with Rails but couldn't find

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.