The Racket repository
![]() A `string-split` on a big string with lots of small matches sends the regexp matcher a big string many times. Decoding 1024 bytes each time is too much. Decoding 32 bytes is be a better trade-off between chunking for large matches and being lazy for small matches. For example, on a 60MB string with a space every 15 characters or so, splitting on a space is about 3 times as fast with this adjustment. I tried a few chunk sizes, and 32 worked the best in my experiments. Naturally, as more bytes are read, the chunk size ramps up, so it's a question of initial size; larger matches are relatively insensitive to the initial size (so, again, it makes little sense to cater to large matches with a large initial decoding size of 1024 bytes). |
||
---|---|---|
native-pkgs@60c510ba85 | ||
pkgs | ||
racket | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
.mailmap | ||
.travis.yml | ||
INSTALL.txt | ||
Makefile | ||
README.txt |
This is the source code for the main Racket distribution. See "INSTALL.txt" for information on building Racket. License ------- Racket Copyright (c) 2010-2014 PLT Design Inc. Racket is distributed under the GNU Lesser General Public License (LGPL). This means that you can link Racket into proprietary applications, provided you follow the rules stated in the LGPL. You can also modify Racket; if you distribute a modified version, you must distribute it under the terms of the LGPL, which in particular means that you must release the source code for the modified software. See racket/src/COPYING_LESSER.txt for more information.