Unoptimized slicing?

new topic     » topic index » view thread      » older message » newer message

a = rand(repeat(200, 200))

I found that the operation

  c = a[1..length(a)]
     or
  c = a[1..200]

is much slower than

  c = a

Why isn't it optimized? (check the length of the slice, if it's equal
to the original sequence the pointer should be copied not the
contents)

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu