Skip to content

Commit

Permalink
Reduce the number of resize required to read most method bodies
Browse files Browse the repository at this point in the history
  • Loading branch information
jbevain committed Dec 2, 2011
1 parent abdf659 commit 435974a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Mono.Cecil.Cil/CodeReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ void ReadCode ()
code_size = 0;

var end = start + code_size;
var instructions = body.instructions = new InstructionCollection (code_size / 3);
var instructions = body.instructions = new InstructionCollection ((code_size + 1) / 2);

while (position < end) {
var offset = base.position - start;
Expand Down

0 comments on commit 435974a

Please sign in to comment.