Comments (4)
For performance reasons, offsets are not automatically calculated. You can trigger offset calculation using Instructions.CalculateOffsets()
.
from asmresolver.
Why not calculate them each time an instruction is added to the list? Does this still cause performance issues?
@AnErrupTion Yes. Calculating the offset of a new instruction at the end of the list may be relatively easy (i.e., just get the last instruction's offset + size), but anything more substantial (e.g., inserting in the middle or removing an instruction) will require an O(n) operation to refresh all offsets. Given that typically offsets aren't really that important in CIL anyways, this design choice was made.
from asmresolver.
For performance reasons, offsets are not automatically calculated. You can trigger offset calculation using
Instructions.CalculateOffsets()
.
Why not calculate them each time an instruction is added to the list? Does this still cause performance issues?
from asmresolver.
Why not calculate them each time an instruction is added to the list? Does this still cause performance issues?
@AnErrupTion Yes. Calculating the offset of a new instruction at the end of the list may be relatively easy (i.e., just get the last instruction's offset + size), but anything more substantial (e.g., inserting in the middle or removing an instruction) will require an O(n) operation to refresh all offsets. Given that typically offsets aren't really that important in CIL anyways, this design choice was made.
That makes sense :p
from asmresolver.
Related Issues (20)
- TypeMemoryLayout + GenericInst struct = Infinity Loop HOT 3
- Replace System.Text.Json dependency in AsmResolver.DotNet with internal light-weight JSON parser HOT 2
- Section names with invalid UTF-8 codepoints fails the length limit of 8 bytes check HOT 5
- Change PESection::Name to Utf8String
- Retain Language Identifiers for VersionInfo Resources HOT 1
- `Assembly.FullName` is not including `Culture=...` part HOT 1
- Writing modules that have TypeRefs defined in the same module results in a null ResolutionScope HOT 2
- .NET Runtime Contexts
- Use `EmptyErrorListener` as the Default Reader Error Handler HOT 4
- StackOverflow when trying to write a file after patching HOT 1
- Suppress BadImageFormatException HOT 6
- MemberCloner doesn't handle custom attribute arguments corresponding to cloned types HOT 1
- Updating references to a generic class? HOT 5
- AsmResolver.Elf HOT 2
- Reading entry assembly in AppHost / SingleFileHost HOT 4
- Add IsReferenceOrContainsReferences Equivalent for ITypeDescriptors
- Just some questions HOT 23
- `IWin32Resource::WriteToDirectory` does not take sorting into account
- Allow language identifiers to be customized and preserved in `IconResource` HOT 1
- Add .NET 3.5 Targets HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asmresolver.