Boost C++ Libraries: Ticket #11590: cpp_int initialization inefficient https://svn.boost.org/trac10/ticket/11590 <p> I tried to create an cpp_int with about 10 million digits from a hex string "0x1....1"; it literally take ages. The reasons seems to be the repeated shift and add conversion from the characters; while that is inevitable for decimal digits, a hex encoded string would allow to directly determine the final position and shift in the corresponding limb. </p> <p> TODO: check supplied string for valid hex encoding, allocate enough zero-initialized limbs and then directly set the value of the corresponding limb. </p> <p> A further improvement would be to supply a conversion from a sequence of values that are stored in some linear container. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11590 Trac 1.4.3 anonymous Mon, 14 Sep 2015 08:28:55 GMT <link>https://svn.boost.org/trac10/ticket/11590#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11590#comment:1</guid> <description> <p> Will fix shortly. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Mon, 21 Sep 2015 11:02:52 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/11590#comment:2 https://svn.boost.org/trac10/ticket/11590#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> I believe this is now fixed in develop for hex and octal numbers. </p> <p> Docs for import/export to external storage here: <a class="ext-link" href="https://rawgit.com/boostorg/multiprecision/develop/doc/html/boost_multiprecision/tut/import_export.html"><span class="icon">​</span>https://rawgit.com/boostorg/multiprecision/develop/doc/html/boost_multiprecision/tut/import_export.html</a>, comments welcome. </p> Ticket