Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Space–time tradeoff

From Wikipedia, the free encyclopedia
Algorithm trading more space for lower time
This article has multiple issues. Please helpimprove it or discuss these issues on thetalk page.(Learn how and when to remove these messages)
This article mayrequirecleanup to meet Wikipedia'squality standards. The specific problem is:casual tone, lack of detail. Please helpimprove this article if you can.(March 2014) (Learn how and when to remove this message)
icon
This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Space–time tradeoff" – news ·newspapers ·books ·scholar ·JSTOR
(February 2025) (Learn how and when to remove this message)
(Learn how and when to remove this message)

Aspace–time trade-off, also known astime–memory trade-off orthe algorithmic space-time continuum incomputer science is a case where analgorithm orprogramtrades increased space usage with decreased time. Here,space refers to thedata storage consumed in performing a given task (RAM,HDD, etc.), andtime refers to the time consumed in performing a given task (computation time orresponse time).

The utility of a given space–time tradeoff is affected by relatedfixed andvariable costs (of, e.g.,CPU speed, storage space), and is subject todiminishing returns.

History

[edit]

Biological usage of time–memory tradeoffs can be seen in the earlier stages ofanimal behavior. Using stored knowledge or encoding stimuli reactions as "instincts" in the DNA avoids the need for "calculation" in time-critical situations. More specific to computers,lookup tables have been implemented since the very earliest operating systems.[citation needed]

In 1980Martin Hellman first proposed using a time–memory tradeoff forcryptanalysis.[1]

Types of tradeoff

[edit]

Lookup tables vs. recalculation

[edit]

A common situation is an algorithm involving alookup table: an implementation can include the entire table, which reduces computing time, but increases the amount of memory needed, or it can compute table entries as needed, increasing computing time, but reducing memory requirements.

Database indexes vs. table scans

[edit]

Database Management Systems offer the capability to createdatabase index data structures. Indexes improve the speed of lookup operations at the cost of additional space. Without indexes, time-consumingfull table scan operations are sometimes required to locate desired data.

Compressed vs. uncompressed data

[edit]

A space–time trade off can be applied to the problem of data storage. If data is stored uncompressed, it takes more space but access takes less time than if the data were stored compressed (since compressing the data reduces the amount of space it takes, but it takes time to run thedecompression algorithm). Depending on the particular instance of the problem, either way is practical. There are also rare instances where it is possible to directly work with compressed data, such as in the case of compressedbitmap indices, where it is faster to work with compression than without compression.

Re-rendering vs. stored images

[edit]

Storing only theSVG source of avector image and rendering it as abitmap image every time the page is requested would be trading time for space; more time used, but less space. Rendering the image when the page is changed and storing the rendered images would be trading space for time; more space used, but less time. This technique is more generally known ascaching.

Smaller code vs. loop unrolling

[edit]

Larger code size can be traded for higher program speed when applyingloop unrolling. This technique makes the code longer for each iteration of a loop, but saves the computation time required for jumping back to the beginning of the loop at the end of each iteration.

Other examples

[edit]

Algorithms that also make use of space–time tradeoffs include:

See also

[edit]

References

[edit]
  1. ^Hellman, Martin (July 1980). "A Cryptanalytic Time-Memory Tradeoff".IEEE Transactions on Information Theory.26 (4):401–406.CiteSeerX 10.1.1.120.2463.doi:10.1109/tit.1980.1056220.S2CID 552536.

External links

[edit]
Retrieved from "https://en.wikipedia.org/w/index.php?title=Space–time_tradeoff&oldid=1320571595"
Category:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp