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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T17:53:57+00:00 2026-05-21T17:53:57+00:00

Say I have a poor language – that creates lot of redundant assembly code

  • 0

Say I have a poor language – that creates lot of redundant assembly code ( like say for something as simple as a+b it creates a 10 liner assembly but does the job )
and another C like language which creates nice optimized assembly code ( 2 lines for a simple code like a + b) .
I create a compiler in both these languages with the same subset
Now I get a compiler for my language and am ready for bootstrapping
Don’t you think the compiler of the former case would be a bad choice though it can do bootstrapping albeit a poort code generation ?
Alternatively isn’t the first language used for defining the subset going to have its influence in all the layers about ? I.e a compiler generated from this compiler ?

  • 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-21T17:53:58+00:00Added an answer on May 21, 2026 at 5:53 pm

    A freshly boot strapped compiler won’t beat a C compiler, that’s for sure. But nobody says it has to stay that way (well, you’ll have a very hard time beating even modern C compilers, but let’s assume we’re competing with something else than compilers for portable assembly language refined over thirty years). Depending on your language, it’s very possible that extending the bootstrapped compiler is much easier than extending the one written in C. This can allow many optimization passes that would have been harder to implement in C, gradually increasing the performance of your compiler (as it self-hosts, i.e. compiles itself) and the performance of all other programs you compile.

    That distinction brings us to another important point: The compiler’s performance is rarely relevant, as long as it’s not completely unreasonable. The performance of the generated code is usually much more important, and that depends on your compiler’s code generator, not on the code generator of the compiler used to compile your generator.

    Third, with projects such as LLVM, generating decent assembly code is no longer as hard as it used to be. If you generate okay LLVM code, even if it contains redundancy, LLVM has many optimization passes that can take care of that and will produce better actual assembly code and allocate registers better than you could do by yourself within a reasonable timespan.

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

Sidebar

Related Questions

Let's say have something like: SELECT energy_produced, energy_consumed, timestamp1 AS timestamp FROM ( SELECT
First of all, I would like to say that I have used the search
Say you have 3 layers: UI, Business, Data. Is that a sign of poor
Say I have a class named Frog, it looks like: public class Frog {
Let's say that you have a standalone application (a Java application in my case)
I have a poor man's replication setup that I can't do anything about. Some
So Say I have an array of bytes that is 16 long, with each
Let's say you have a .NET system that needs to send out email notifications
Let say we have set of URLs like this yoursite.com/39827-key1-key2-key3 yoursite.com/132-key1-key2-key3 yoursite.com/9223455-key1-key2-key3 and so
Let's say I have a class. I would like to declare a property in

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.