Browse Source

#295 Increase initial capacity of Instructions collection.

pull/285/merge
Ed Harvey 14 years ago
parent
commit
cadd540679
  1. 2
      Mono.Cecil/Mono.Cecil.Cil/CodeReader.cs

2
Mono.Cecil/Mono.Cecil.Cil/CodeReader.cs

@ -145,7 +145,7 @@ namespace Mono.Cecil.Cil { @@ -145,7 +145,7 @@ namespace Mono.Cecil.Cil {
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;

Loading…
Cancel
Save