standard ranges
Roman D. Boiko
rb at d-coding.com
Thu Jun 28 03:02:57 PDT 2012
On Thursday, 28 June 2012 at 09:58:02 UTC, Roman D. Boiko wrote:
> Pedantically speaking, it is possible to index a string with
> about 50-51% memory overhead to get random access in 0(1) time.
> Best-performing algorithms can do random access in about 35-50
> nanoseconds per operation for strings up to tens of megabytes.
> For bigger strings (tested up to 1GB) or when some other
> memory-intensive calculations are performed simultaneously,
> random access takes up to 200 nanoseconds due to memory-access
> resolution process.
Just a remark, indexing would take O(N) operations and N/B memory
transfers where N = str.length and B is size of cache buffer.
More information about the Digitalmars-d
mailing list