In computer science, a gap buffer is a dynamic array that allows efficient insertion and deletion operations clustered near the same location. Gap buffers are especially common in text editors, where most changes to the text occur at or near the current location of the cursor. The text is stored in a large buffer in two contiguous segments, with a gap between them for inserting new text.

PropertyValue
dbpprop:abstract
  • In computer science, a gap buffer is a dynamic array that allows efficient insertion and deletion operations clustered near the same location. Gap buffers are especially common in text editors, where most changes to the text occur at or near the current location of the cursor. The text is stored in a large buffer in two contiguous segments, with a gap between them for inserting new text. Moving the cursor involves copying text from one side of the gap to the other (sometimes copying is delayed until the next operation that changes the text). Insertion adds new text at the end of the first segment. Deletion increases the size of the gap. The advantage of using a gap buffer over more sophisticated data structures is that the text is represented simply as two literal strings, which take very little extra space and which can be searched and displayed very quickly. The disadvantage is that operations at different locations in the text and ones that fill the gap (requiring a new gap to be created) require re-copying most of the text, which is especially inefficient for large files. The use of gap buffers is based on the assumption that such recopying occurs rarely enough that its cost can be amortized over the more common cheap operations. A gap buffer is used in most Emacs editors.
  • Un buffer gap, in informatica, rappresenta una struttura dati utilizzata per memorizzare lunghi vettori in modo compatto, mantenendo efficienti le operazioni di inserimento e rimozione, a condizione che queste siano eseguite intorno alla stessa locazione.
dbpprop:hasPhotoCollection
dbpprop:reference
rdf:type
rdfs:comment
  • In computer science, a gap buffer is a dynamic array that allows efficient insertion and deletion operations clustered near the same location. Gap buffers are especially common in text editors, where most changes to the text occur at or near the current location of the cursor. The text is stored in a large buffer in two contiguous segments, with a gap between them for inserting new text.
  • Un buffer gap, in informatica, rappresenta una struttura dati utilizzata per memorizzare lunghi vettori in modo compatto, mantenendo efficienti le operazioni di inserimento e rimozione, a condizione che queste siano eseguite intorno alla stessa locazione.
rdfs:label
  • Gap buffer
  • Buffer gap
owl:sameAs
skos:subject
foaf:page
is dbpprop:redirect of
is owl:sameAs of