This commit is contained in:
Torsten Ruger 2014-07-11 21:02:13 +03:00
parent e26f6df051
commit b6c1e380e1
2 changed files with 3 additions and 3 deletions

View File

@ -17,13 +17,13 @@ But this can easily lead to a dictionary/hash type of implementation. As variabl
common thing an OO system does, that leads to bad performance (unneccessarily).
So instead we keep variables layed out c++ style, continous, array style, at the address of the object. Then we have
to manage that in a dynamic manner. This (as i mentioned elsewhere) is done by the indirection of the Layout. A Layout is
to manage that in a dynamic manner. This (as i mentioned [here](memory.html)) is done by the indirection of the Layout. A Layout is
a dynamic structure mapping names to indexes (actually implemented as an array too, but the api is hash-like).
When a new variable is added, we create a *new* Layout and change the Layout of the object. We can do this as the Layout will
determine the Class of the object, which stays the same. The memory page mentions how this works with constant sized objects.
So, Problem one fixed: instance variable access at o(0)
So, Problem one fixed: instance variable access at O(1)
#### II - Method lookup

View File

@ -14,7 +14,7 @@ sub-title: By way of a new look at programming.
Efficiency is going fast, like an airplane is much more efficient than a car and that is more so than walking.
</p>
<p>
Effectiveness on the other hand is how straight your route is. Say your in Hamburg and want to go to Berlin, then
Effectiveness on the other hand is how straight your route is. Say you're in Hamburg and want to go to Berlin, then
it is not effective to go to Rome first.
</p>
<p>