Nim/lib/pure
Charles Blake 42f8f1cd1f Fix unnecessarily slow set building from openArray.
The estimation of the initialSize as simply array len + 10 was too small for
for all but the smallest sets.  It would not elide/skip one final enlarge().
That last one is actually always the most expensive enlarge().  Indeed, in a
series where one to start from tiny and build up the table..that last one is
about 50% of all the enlarging time in general.  So, this simple and reasonable
optimization (compared to just starting at 64) was only helping about half as
much as it could.

Introduce a rightSize() proc to be the inverse to mustRehash().  Export it
to clients since pre-sizing is externally useful in set construction and the
current mustRehash rules are opaque and beyond the control of clients.

Also add test module logic to check that rightSize() and mustRehash() are
inverses in the appropriate sense..not really in a block/assertion throwing
unit test since this is a peformance nice-to-have issue rather than about
basic correctness.  (Also, fix a too vs. two typo in doc comment.)
2015-02-07 09:37:17 -05:00
..
collections Fix unnecessarily slow set building from openArray. 2015-02-07 09:37:17 -05:00
concurrency Happy new year! 2015-01-06 15:26:33 +01:00
unidecode big rename 2014-08-27 23:42:51 +02:00
actors.nim Nimrod renamed to Nim 2014-08-28 09:59:26 +02:00
actors.nim.cfg renamed babelcmd to nimblecmd; config files are now nim.cfg; other renamings 2014-08-29 09:03:00 +02:00
algorithm.nim Add nextPermutation and prevPermutation 2015-02-01 18:29:01 +01:00
asyncdispatch.nim Happy new year! 2015-01-06 15:26:33 +01:00
asyncdispatch.nimrod.cfg Fix docgen. 2014-03-29 22:01:20 +00:00
asyncfile.nim Happy new year! 2015-01-06 15:26:33 +01:00
asyncftpclient.nim Happy new year! 2015-01-06 15:26:33 +01:00
asynchttpserver.nim Happy new year! 2015-01-06 15:26:33 +01:00
asyncio.nim Deprecated asyncio module. Fixed old tests. 2014-12-26 19:21:34 +00:00
asyncnet.nim Happy new year! 2015-01-06 15:26:33 +01:00
base64.nim Some docgen fixes. 2014-09-13 15:35:09 +01:00
basic2d.nim updated basic2d, basic3d modules 2014-08-28 01:27:36 +02:00
basic3d.nim updated basic2d, basic3d modules 2014-08-28 01:27:36 +02:00
browsers.nim big rename 2014-08-27 23:42:51 +02:00
cgi.nim renamed URLencode to encodeUrl 2014-09-10 23:25:29 +02:00
colors.nim big rename 2014-08-27 23:42:51 +02:00
complex.nim Added complex conjugate 2015-01-24 22:57:19 -05:00
cookies.nim merged things from devel 2014-09-12 01:37:48 +02:00
dynlib.nim fixed poxix dynlib names for bigbreak 2014-09-04 21:38:45 -07:00
encodings.nim Happy new year! 2015-01-06 15:26:33 +01:00
endians.nim big rename 2014-08-27 23:42:51 +02:00
events.nim minor improvements to the docs 2014-12-14 11:50:10 +01:00
fenv.nim Happy new year! 2015-01-06 15:26:33 +01:00
fsmonitor.nim updated fsmonitor 2014-09-17 23:13:58 +02:00
ftpclient.nim Happy new year! 2015-01-06 15:26:33 +01:00
future.nim Remove unnecessary check in list comprehensions 2015-01-10 22:54:39 +01:00
gentabs.nim make tests green 2014-08-31 15:15:26 +02:00
hashes.nim big rename 2014-08-27 23:42:51 +02:00
htmlgen.nim Happy new year! 2015-01-06 15:26:33 +01:00
htmlparser.nim make tests green 2014-08-31 15:15:26 +02:00
httpclient.nim Added documentation for the new http request procedures. 2015-01-23 22:06:57 -05:00
httpserver.nim Fix some deprecation warnings caused by renames 2014-11-13 21:34:46 +01:00
json.nim Add mitems and mpairs where it makes sense 2015-01-28 02:31:26 +01:00
lexbase.nim more modules updated 2014-08-28 01:41:41 +02:00
logging.nim newRollingFileLogger - fmtStr is always set to defaultFmtStr 2015-02-06 22:40:21 +01:00
marshal.nim Happy new year! 2015-01-06 15:26:33 +01:00
matchers.nim Happy new year! 2015-01-06 15:26:33 +01:00
math.nim Happy new year! 2015-01-06 15:26:33 +01:00
md5.nim Translate md5 module to unsigned numbers 2015-01-03 14:21:26 +01:00
memfiles.nim Happy new year! 2015-01-06 15:26:33 +01:00
mersenne.nim big rename 2014-08-27 23:42:51 +02:00
mimetypes.nim big rename 2014-08-27 23:42:51 +02:00
net.nim fixes the integer conversion regressions 2015-01-13 20:56:31 +01:00
nimprof.nim more modules updated 2014-08-28 02:14:25 +02:00
nimprof.nimrod.cfg made some tests green; implemented 'from module import nil' 2013-05-19 23:17:16 +02:00
numeric.nim big rename 2014-08-27 23:42:51 +02:00
oids.nim Remove extra trailing zero from oid 2014-11-02 17:08:35 -05:00
os.nim lots of C++ codegen improvements 2015-02-07 10:48:07 +01:00
osproc.nim FreeBSD-specific code 2015-01-29 12:51:22 +01:00
parsecfg.nim Nimrod renamed to Nim 2014-08-28 09:50:51 +02:00
parsecsv.nim more stdlib modules work 2014-08-31 15:25:54 +02:00
parseopt.nim Happy new year! 2015-01-06 15:26:33 +01:00
parseopt2.nim Happy new year! 2015-01-06 15:26:33 +01:00
parsesql.nim several modules changed 2014-08-28 02:21:49 +02:00
parseurl.nim Happy new year! 2015-01-06 15:26:33 +01:00
parseutils.nim fixes #2041 2015-01-31 11:49:19 +01:00
parsexml.nim updated xml modules 2014-09-18 09:59:11 +02:00
pegs.nim Get rid of deprecation warnings in pegs 2015-01-16 00:23:33 +01:00
pegs.nimfix Get rid of deprecation warnings in pegs 2015-01-16 00:23:33 +01:00
poly.nim Typo 2015-01-28 02:31:26 +01:00
rawsockets.nim Happy new year! 2015-01-06 15:26:33 +01:00
rawsockets.pretty.nim Happy new year! 2015-01-06 15:26:33 +01:00
redis.nim more stdlib modules work 2014-08-31 15:25:54 +02:00
romans.nim big rename 2014-08-27 23:42:51 +02:00
ropes.nim make tests green 2014-08-31 15:15:26 +02:00
scgi.nim Added warning to scgi module. 2014-12-26 16:37:32 +00:00
selectors.nim Handle EPOLLHUP to avoid chaos/runaways when using certain file descriptors. 2015-01-21 18:15:38 +03:00
smtp.nim Fix some deprecation warnings caused by renames 2014-11-13 21:34:46 +01:00
smtp.nimrod.cfg next steps for closure consistency; fixes #176 2012-07-25 21:59:31 +02:00
sockets.nim Emphasises deprecation warning in sockets module. 2014-12-26 16:26:28 +00:00
streams.nim fixes the integer conversion regressions 2015-01-13 20:56:31 +01:00
strtabs.nim configuration system supports %= to access environment variables 2015-02-07 12:55:23 +01:00
strutils.nim fixes #2041 2015-01-31 11:49:19 +01:00
subexes.nim fixes #1730 2014-12-17 01:43:22 +01:00
terminal.nim Fix #1906 2015-01-22 18:34:33 -05:00
times.nim merged things from devel 2014-09-12 01:37:48 +02:00
typetraits.nim Nimrod renamed to Nim 2014-08-28 09:50:51 +02:00
unicode.nim Optimize unicode.reversed 2015-01-15 23:11:02 +01:00
unittest.nim Try to fix unittest for JS backend, still not working 2015-02-04 21:44:25 +01:00
uri.nim Happy new year! 2015-01-06 15:26:33 +01:00
xmldom.nim xmldom adheres to the new style 2014-09-17 23:12:54 +02:00
xmldomparser.nim updated xml modules 2014-09-18 09:59:11 +02:00
xmlparser.nim more tests green 2014-08-31 17:23:35 +02:00
xmltree.nim Add mitems and mpairs where it makes sense 2015-01-28 02:31:26 +01:00