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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:26:07+00:00 2026-05-22T17:26:07+00:00

I’ve been thinking about how to best bridge the gap between CLR world (.NET

  • 0

I’ve been thinking about how to best bridge the gap between CLR world (.NET runtime) and JavaScript and one thing that came to mind was this notion of a type in JavaScript that it is somewhat inferred from the usage while i.e. C# doesn’t need to do this.

I’d like to know a little more about the implementation specifics of JavaScript engines specifically regard how your treat a number. The standard outlines a series of operations that are valid in certain contexts and yields certain specific results, strictly speaking, the concept of an integer doesn’t exist in JavaScript but there are typical integer arithmetic operations such as bit shift (>>) which always operate on a 32-bit signed integer and always yields a 32-bit signed integer.

I guess the hard part is figuring out when a number is an integer and when a number isn’t an integer. But how does VMs do this?

var x = 1; // is this an integer or a double?
var x = 1.0; // is this an integer or a double?
var x = 2147483648; // is this an integer or a double?
var x = 9007199254740993; // is this an integer, double or runtime error?

I’m guessing there’s a lot of heuristics that goes into this. I’m specifically looking for some underlying theme that can be sort of used to better reason about these things.

Also from a performance perspective if you realizes that certain numbers are used as integer you can absolutely optimize those situations by sticking to integers. Though, how do you know when to do this?

Any JavaScript VM gurus out there who’d like to take a stab at this? (at this point I’m more interested in the internals of the VM than the actual specifics of the specification)

  • 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-05-22T17:26:08+00:00Added an answer on May 22, 2026 at 5:26 pm

    If you want to get into the nuts-and-bolts of how JavaScript implementations handle the Number type, there’s nothing like going to the source. I’d look at:

    • The V8 source code (V8 is Google’s JavaScript engine, used in Chrome and NodeJS and some other places. One of the fastest out there.)
    • The SpiderMonkey source code (SpiderMonkey is Mozilla’s engine, used in Firefox)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am reading a book about Javascript and jQuery and using one of the
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I am trying to render a haml file in a javascript response like so:
I'm making a simple page using Google Maps API 3. My first. One marker
That's pretty much it. I'm using Nokogiri to scrape a web page what has

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.