Age | Commit message (Collapse) | Author |
|
On my machine, for a 2.2 GB file of random bytes, the timings with
warm cache are:
toybox before: 11.4 seconds
toybox after: 8.3 seconds
GNU md5sum: 3.9 seconds
openssl dgst -md5: 3.5 seconds
This is clearly better than before (3x openssl), but still slow (2x openssl).
I suspect there is more low-hanging fruit to be had by eliminating the
memcpy in hash_update (maybe not too much - hash_update accounts for
about 4% of total runtime versus 92% for md5_transform according to
perf - but this would also help sha1sum).
make bloatcheck on x86_64 gcc 4.8.2 -Os:
name old new delta
-----------------------------------------------------------------------
md5rot 0 64 64
md5_transform 365 223 -142
-----------------------------------------------------------------------
-78 total
Rationale for the changes:
Move definition of 'rol' up so it can be used in md5_transform. This
is purely cosmetic; it expands to exactly the same code.
Put rotation counts in a lookup table instead of calculating them on
the fly. This is mostly a wash size-wise, +5 bytes total, but
worthwhile for readability and speed.
Instead of accessing the state array using a rotating index (the
variable formerly known as 'a'), access the state with constant
offsets and rotate the contents of the array instead. This is the big
win - it eliminates all the crazy memory addressing math inside the
loop.
|
|
|
|
|
|
Not heavily tested yet but should be finished at the design level.
|
|
Remove unnecessary typecasting of things that are already char * to char *,
and multiplying by sizeof(char *) which is 1. Rename do_process() do_flag_a()
since that's the only caller. Move read_key_values() down past trim_spaces()
and read_config_file() so it's next to its only two users. Replace some
euphemisms for 0 with 0.
replace_char() really sounds like something libc should already have one of,
but I'm blanking on it if so. (It doesn't need a temporary variable when the
argument variable is already a copy so changing it won't affect the caller.)
|
|
|
|
|
|
so strncmp(dest, "string", sizeof("string")) is just strcpy.
|
|
loop, don't bother to stat an empty file to report when an empty log was created (just report current time).
|
|
identify the culprit).
|
|
du use it, move it from lib/pending.c to lib.c.
|
|
or float for FLOAT arguments. (I.E. whether double fits in a long's memory.) Check in a way that the macros not being defined just gives us the shorter one.
|
|
toy_init() doesn't zero the rest of the struct.
|
|
free can cause a crash, if the buffer passed by user of function is not malloc'ed one.
names_to_pid() is one usecase example here.
|
|
This is the modified and better version from the last one I sent.
It is having the both the mains (lsattr_main() and chattr_main() )
in single file.
Also removed the dependency of additional file in lib, as common code is in the
same .c file.
|
|
Note that directory timestamps are still sometimes wrong because creating
things in a directory can update the timestamp. Also, cp -r has logic to
ensure we can write to a directory that doesn't have write permission,
cpio does not. This is fixable, but not what existing cpio does.
|
|
|
|
|
|
output type even though an output type was specified).
|
|
more complciated stuff (multiple commands per file, etc), and have genconfig.sh sort backwards so posix is first and example last in menuconfig.
|
|
get iconv(), probe and build defconfig without it if it's not there.
|
|
consistent).
|
|
|
|
|
|
option for un/refolding text.
|
|
Isaac's roadmap update.
Mercurial's "import" command is still broken, committing local tree changes to files that weren't even touched by the patch because the hg developers inisist, when I point out how stupid it is, that they meant to do that. (hg record can do hunks, but import can't even track _files_.)
|
|
|
|
cross compiling, so just #define it to 0 if it's not in fcntl.h where posix-2008 says.
|
|
This implementation depends on the _stty_ 'sane' settings.
|
|
of the format __C2:79:38:95:CD:AB__ but can be of form __C2:79:38:95:D:A__. In this case the HW address is reported as bad.
|
|
|
|
|
|
Attached is a simple version using the libc's iconv.
|
|
build fix: xmsprintf has been renamed
shorten and lowercase the error messages
use xexec() instead of execlp(); perror_exit();
remove redundant variable setting
|
|
|
|
Some glibc commands are irrelevant because they're for functionality
that is excluded from musl (mtrace, rpc*, localedef, iconvconfig, nscd).
getconf and catchsegv look like candidates for the development toolchain;
locale and iconv were already triaged.
getent is pretty lame, but it and the timezone stuff (tzselect zic
zdump) are the only new possibly interesting commands.
|
|
|
|
Move <fnmatch.h> to toys.h, since it's POSIX.
Avoid duplicating code in an if/else block.
Terser error messages, spelling.
Don't always print the state.
|
|
|
|
|
|
No idea what to do about 'em yet, but there they are.
|
|
|
|
|
|
Only the first __long__ option, without any __short__ option had a proper
flag value, rest all were defined to ZERO. Becaus the _flist_ was not moved
to the next in this case.
|
|
help entry.
|
|
console, without a need for read or write permissions. O_RDWR implies that both O_RDONLY and O_WRONLY would work, so skip it. Reindent.
|
|
characters, though that would probably just require more switch cases.
|
|
decompression side's already reimplemented in compress, and I'm working on compression side.
|
|
the prefix length.
|
|
|