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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:45:07+00:00 2026-06-17T14:45:07+00:00

I need to make a hash table that can eventually be used to write

  • 0

I need to make a hash table that can eventually be used to write a full assembler.

Basically I will have something like:
foo 100,

and I will need to hash foo and then store the 100 (the address of the command). I was thinking I should just use a 2d array. The second dimension of the array would only be accessed when recording the address (just an int) or when returning the address. There would be no searching done in the second dimension.

If I implement the hash table this way, would it be inefficient? If it is very inefficient, what would be a better way to implement the table?

Edit: I haven’t written any code yet. In fact I don’t even know what language I’m going to use yet. I want to write it in C so it will be more of a challenge, but I might write it in Java if I feel pressured for time.

  • 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-17T14:45:08+00:00Added an answer on June 17, 2026 at 2:45 pm

    If you have every other int in the array unused then in addition to memory waste you’re going to use the cache poorly as the cache lines will be underused.

    But normally I wouldn’t worry about such things when writing an assembler as it’s not something very performance demanding as say graphics or heavy computations. At least, I wouldn’t rush into optimizing too early.

    It is, however, important to keep in mind that once you start assembling large pieces of code (~100,000 lines of assembly) generated automatically (say, from C/C++ code by a compiler), performance will become more and more important as the user experience (wait times) degrades. At that point there will be many candidates for optimization: I/O, parsing, symbol look up, generation of as short as possible jump instructions if they can have multiple encodings for shorter and longer jumps. Expressions and macros will contribute too. You may even consider minimizing white space and comments in the input assembly code in the first place.

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

Sidebar

Related Questions

I need to make a moderate system like the one in fmylife.com. Basically the
I need to make a series (1-20) ajax calls and I need to have
I need to make the top header of a report disappear. The part that
I need to implement a hash table to maintain IP packets. However, due to
I have a join table that I'm using to find available services for an
I have a SQL table readings something like: id int client_id int device_id int
I'm currently implementing a hash table in C++ and I'm trying to make a
i have a function in Lua that operates on a table, repeatedly adding entries
A little context: I'm trying to make a very simple hashing function/hash table as
Hello I built a hash table in C. I have unit tested it enough

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.