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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:16:02+00:00 2026-06-18T03:16:02+00:00

I’ve been thinking of how machine code is specific to architecture and how Javascript

  • 0

I’ve been thinking of how machine code is specific to architecture and how Javascript works in (nearly)every browser.
I’ve been working on a project that has to do some serious calculations and it is Javascript based and takes a full minute to finish the calculating. It makes me long for the speed of C. But the whole reason the project is in Javascript is for simplicity and portability.

Which gave me the idea, what if there was a language similar to Javascript that was just as portable and ran as an executable file on every architecture?
Most people would point to Java, but I’m thinking something with less overhead and handled by the OS. Not byte code but native machine code.

Did a bit of researching and thinking to come to the impossibility of this task. How would you make an executable file as small as the normal C written application for a specific architecture that works on every architecture with the same speed as if it were natively compiled in C for that architecture?

Which comes to my next idea. Native machine code is specific to architecture, each architecture has certain special features and sometimes handles the same task differently. Also certain optimizations are specific per architecture.
What if there was a Universal Machine Code? When the OS loads the instructions into ram, it automagically converts the instructions to adapt to the architecture. Or perhaps (crazier idea) the CPU could contain the ability to receive the universal machine code and automatically adapts the universal machine code into it’s native machine code?

The Universal Machine Code specification would have to be generic enough to cover the normal Machine Code functions.

Of course if the Universal Machine Code did work, people would probably want a universal executable format that’s handled by all OSes. That way the executable need not change across OSes. Which leads to frameworks that need to be made specifically to be universal across machines. And more nitty gritty would be OS specific features, and the ability for input and output which is going beyond what I know.

Universal Machine Code compiled executable:

Pros:

  • Nearly same size as a native compiled executable
  • Nearly if not the same performance of a native compiled executable

Cons:

  • Slightly(hopefully non-existantly) slower in loading as it converts the universal machine code to native machine code when loading the executable in ram

Is it feasible?

Edit:

I have used Java, made a game in it. It’s not as *universal as I’d like, nor as friendly.
* It is it’s own programming language, maintained by Oracle. Proprietary and a bit too massive. Requires installation on some machines.

And to be more specific I’m not talking about having a new programming language. I’m talking about having a new machine code language that holds enough extra information that when executed, a very thin process of translating it to the architecture’s machine code happens.
That way C compilers can just compile their executables into the universal machine code and the executables could run everywhere.

  • 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-18T03:16:03+00:00Added an answer on June 18, 2026 at 3:16 am

    there’s already something like that, its called p-code

    http://en.wikipedia.org/wiki/P-code_machine

    these days, VMs basically act in that role

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

Sidebar

Related Questions

I have a small JavaScript validation script that validates inputs based on Regex. I
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
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
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
I am doing a simple coin flipping experiment for class that involves flipping a
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into

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.