Everything2
Near Matches
Ignore Exact
Full Text
Everything2

lazy delete

created by enth

(thing) by enth (4.6 d) (print)   ?   (I like it!) 1 C! Wed Mar 07 2001 at 0:04:16

From computer science, this is the notion of tagging an item to be ignored instead of actually deleting it. When an algorithm traverses down a tree (or other data structure) and hits a node that is tagged, it procedes through the traversal without considering the item. Periodically, the data structure in question is rebuilt with the tagged data excluded. Often this is done when the percentage of deleted nodes reaches a threshold (say, 10%), or after a certain amount of time has passed.

You use a lazy delete in structures which take a prohibitively long time to do a real delete. In trees, for instance, you not only have to find the node and delete it, but do processing farther down in the tree to fill in the empty node created. Balanced trees (such as the AVL tree) are even worse, as the tree needs to be rebalanced after each real delete.

Lazy deletes may strike you as inelegant, but when you consider how much larger the worst case complexity for a delete operation can be than a find operation (O(n lg n) as opposed to O(lg n), etc.), they starts making much more sense.


printable version
chaos

Big-oh notation Reasons you should take up bass guitar AVL tree computer science
ADDA traverse elegant
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
The best nodes of all time:
power structure
A Letter To My Grandfather
New Musical Express
Mr. Mxyzptlk
Medea
Vegas stories: My first girlfriend's wedding
The Werther Effect
Jane's Fighting Nodes
Garry Owen
Why do joints crack?
Aristotle's Lost Library, Medieval Andalusia & Chinese Paper, or How Europe Learned to Learn Again and Why the Renaissance Happened When & Where It Did
How to meet the most girls
Diego Rivera
New Writeups
SwimmingMonkey
Conversations with Fo Fo- the Loneliest dog in Purgatory(fiction)
locke baron
lynx(thing)
Simulacron3
Reality, Dimensions and the Natural Ontology(essay)
SubSane
Making Love to a 9-Foot Woman(person)
Ouzo
Thoughts(idea)
antigravpussy
I fall silent, listening. The breadcrumbs are talking about us(person)
calgon
Buffalo Bill by the pool(poetry)
gate
Anarchy is Order(idea)
ushdfgakjasgh
Scribeling(thing)
XWiz
Trism(review)
artman2003
Briefcase Full of Souls - Part I(fiction)
Dreamvirus
Alan Ladd(person)
waverider37
Harold Holt(person)
The Debutante
Until death do us part(fiction)
Ysardo
a brother to a sister(personal)
This affordable entertainment brought to you by The Everything Development Company