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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:20:27+00:00 2026-05-23T13:20:27+00:00

When you see a line in the IL like: // Code size 25 (0x19)

  • 0

When you see a line in the IL like:

// Code size       25 (0x19)

what does nit actually mean? Is it talking about the (bytes of) memory usage? All I was able to gather was that it is one more than the number of IL lines. Below is the full IL.

.method private hidebysig static void  Execute(string y) cil managed
{
  // Code size       25 (0x19)
  .maxstack  8
  IL_0000:  nop
  IL_0001:  ldstr      "string"
  IL_0006:  call       void [mscorlib]System.Console::WriteLine(string)
  IL_000b:  nop
  IL_000c:  ldarg.0
  IL_000d:  callvirt   instance class [mscorlib]System.Type [mscorlib]System.Object::GetType()
  IL_0012:  call       void [mscorlib]System.Console::WriteLine(object)
  IL_0017:  nop
  IL_0018:  ret
} //

When I look at ECMA_335 documentation, it defines code size as: Size of the code (text) section, or the sum of all code sections if there are multiple sections. (huh?)

  • 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-23T13:20:27+00:00Added an answer on May 23, 2026 at 1:20 pm

    Not all IL opcodes are the same size, and the encoding of the arguments to different opcodes also take up different amounts of space. The “code size” is the size of all opcodes plus the sizes of their operands.

    For instance, the nop opcode is a single byte (as seen by OpCodes.Nop.Size), and doesn’t take any operand (as seen by OpCodes.Nop.OperandType), so the first line requires a single byte (which is why the second line is labeled with IL_0001).

    Likewise, ldstr is also a single byte, but the string argument is represented in IL by a string table offset, which takes 4 bytes (importantly, the contents of the string don’t factor into this calculation), so your second IL instruction takes 5 bytes total (and the third line gets labeled with IL_0006).

    And so on.

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

Sidebar

Related Questions

I have question about try, catch and finally in Java. Consider the following scenario:
I know this will seem like a dumb question but I'm just getting started
Say I have a method like this: public void SaveData() { try { foreach
Perl is continuing to surprise me. I have a code which takes an input
I have the code below and it works pretty good except if you enter
I am trying to cleanup some Javascript code using jshint. In a third-party script
I was just looking at the CodeIgniter source code and I came across a
Possible Duplicate: How does Python compare string and int? An intern was just asking
I worked with Visual Studio 2008 in a C project without problems. Now I
I want to write a paint program in the style of MS Paint. For

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.