mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
Add automatic TMPDIR setup/teardown to GNU Make
We now guarantee TMPDIR will be defined on a per build rule basis. It'll be an absolute path. It'll be secure and unique. It'll be rm -rf'd after the last shell script line in your build rule is executed. If $TMPDIR is already defined, then it'll be created as a subdirectory of your $TMPDIR and then replace the variable with the new definition. The Landlock Make repository will be updated with examples shortly after this change which shall be known as Landlock Make 1.1.1. See #530
This commit is contained in:
parent
e1699c5b68
commit
d36d0634db
25 changed files with 387 additions and 357 deletions
|
@ -17,8 +17,8 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/math.h"
|
||||
#include "libc/stdio/rand.h"
|
||||
#include "libc/runtime/gc.internal.h"
|
||||
#include "libc/stdio/rand.h"
|
||||
#include "libc/testlib/ezbench.h"
|
||||
#include "libc/testlib/testlib.h"
|
||||
#include "libc/x/x.h"
|
||||
|
@ -67,7 +67,19 @@ TEST(fmodf, test) {
|
|||
EXPECT_STREQ("8e+20", gc(xdtoaf(fmodf(8e20, 32e20))));
|
||||
}
|
||||
|
||||
BENCH(fmod, bench) {
|
||||
EZBENCH2("fmod eze", donothing, fmodl(8, 32));
|
||||
EZBENCH2("fmod big", donothing, fmodl(5.319372648326541e+255, M_2_PI));
|
||||
BENCH(fmodf, bench) {
|
||||
EZBENCH2("fmodf eze", donothing, fmodf(8, 32));
|
||||
EZBENCH2("fmodf big", donothing, fmodf(5.319372648326541e+255, M_2_PI));
|
||||
}
|
||||
|
||||
BENCH(fmod, bench) {
|
||||
// fmod-tiny.S goes slow in the average case, fast for big case
|
||||
EZBENCH2("fmod eze", donothing, fmod(8, 32));
|
||||
// fmod.c goes fast for the average case very slow for big case
|
||||
EZBENCH2("fmod big", donothing, fmod(5.319372648326541e+255, M_2_PI));
|
||||
}
|
||||
|
||||
BENCH(fmodl, bench) {
|
||||
EZBENCH2("fmodl eze", donothing, fmodl(8, 32));
|
||||
EZBENCH2("fmodl big", donothing, fmodl(5.319372648326541e+255, M_2_PI));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue