You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FileStream maintains a dirty flag for its buffer, which has to be maintained by every operation that writes to the buffer (e.g. nextPut, nextPutAll:, etc). This is fairly expensive and means that the full benefit of the stream primitives is lost. It is worth experimenting with the VM write barrier/object immutability, to detect the first modification to a buffer so that subsequent writes can proceed at full speed.
This change should not require any VM modifications. The stream primitives will fail if the buffer is immutable, so all it is necessary to do is to mark the buffer immutable on first moving to a new page, and then alter the primitive failure logic to test for the buffer being immutable, and if so set the dirty flag, make the object mutable, and retry. This can all be done in Smalltalk code.
The text was updated successfully, but these errors were encountered:
FileStream maintains a dirty flag for its buffer, which has to be maintained by every operation that writes to the buffer (e.g. nextPut, nextPutAll:, etc). This is fairly expensive and means that the full benefit of the stream primitives is lost. It is worth experimenting with the VM write barrier/object immutability, to detect the first modification to a buffer so that subsequent writes can proceed at full speed.
This change should not require any VM modifications. The stream primitives will fail if the buffer is immutable, so all it is necessary to do is to mark the buffer immutable on first moving to a new page, and then alter the primitive failure logic to test for the buffer being immutable, and if so set the dirty flag, make the object mutable, and retry. This can all be done in Smalltalk code.
The text was updated successfully, but these errors were encountered: