octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #49559] Implementation of containers.Map


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #49559] Implementation of containers.Map
Date: Wed, 5 Apr 2017 17:17:19 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0

Follow-up Comment #16, bug #49559 (project octave):

Rik: typecast should also handle negative values since it is just a
reinterpretation of the bits of the input value.  My idea was that you could
exactly convert any value to 16 hex characters.  Using sprintf with a %g
format causes trouble for large 64-bit integer values.  See for example this
test:


key = intmax ("uint64");
m = containers.Map (key, pi);
assert (m.keys (), {key})


I checked in the following changeset.  I think the performance is still good,
at least it is with this test:


n = 2e3; tic; mapObj = containers.Map(num2cell(1:n),1:n); toc


http://hg.savannah.gnu.org/hgweb/octave/rev/95744d6d7d3b

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?49559>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]