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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:37:49+00:00 2026-06-15T04:37:49+00:00

I was messing around my IL code inside of my dll file (just for

  • 0

I was messing around my IL code inside of my dll file (just for learning purposes). I wanted to see what would happen if I injected my own IL code, for example… I threw in a box call: IL_9999: box !T. I’m wondering if the offset value actually matters though…

Does an IL offset of 9999 cost more in terms of performance than an IL offset of say 1000? My guess is it doesn’t since the compiler itself, while going in order, skips offsets:

IL_000d:  ldc.i4.3
IL_000e:  box        [mscorlib]System.Int32
IL_0013:  call       instance int32 [mscorlib]System.Enum::CompareTo(object)
IL_0018:  call       void [mscorlib]System.Console::WriteLine(int32)
IL_001d:  nop

Also, does it harm my application if my IL offset of 9999 is thrown into the middle of these other IL offset calls that are far lower in value?

  • 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-15T04:37:51+00:00Added an answer on June 15, 2026 at 4:37 am

    All of those IL_XXXX: are not actually offsets, they are labels. It’s just that decompilers tend to add a label to each instruction and name it according to its offset. This is because label names are not preserved in the compiled code (and for example compiled C# probably wouldn’t have meaningful label names even if they were preserved) and the decompiler needs to have at least some labels to use in branching instructions.

    So, if you modify the “offset” and then compile the code using ilasm, you’re actually not changing the code in any way. Because of that, it can’t have any effect on performance.

    One way you could verify this would be by decompiling your modified assembly again.

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

Sidebar

Related Questions

I'm just messing around with a Ndk tutorial I found. The native code uses
I am currently messing around with some code for an advertising network, i have
I have been messing around with writing some stored procedures in .NET code with
The situation is that I've spent some time messing around with some experimental code.
I am messing around and trying out some sample spring code. In this instance
I have been messing around with web.py lately and wanted to grab some stuff
I am messing around with some code, and I have a list which I
I am currently messing around with some code, which will eventually be used in
While messing around with the custom formatting options in Eclipse, in one of the
I've been messing around with this for hours trying different ways of ordering by

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.