mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 14:58:30 +00:00
Make fixes, improvements, and chibicc python bindings
- python now mixes audio 10x faster - python octal notation is restored - chibicc now builds code 3x faster - chibicc now has help documentation - chibicc can now generate basic python bindings - linenoise now supports some paredit-like features See #141
This commit is contained in:
parent
28997f3acb
commit
7061c79c22
121 changed files with 5272 additions and 1928 deletions
|
@ -17,11 +17,27 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/nexgen32e/nexgen32e.h"
|
||||
#include "libc/runtime/gc.internal.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/testlib/ezbench.h"
|
||||
#include "libc/testlib/hyperion.h"
|
||||
#include "libc/testlib/testlib.h"
|
||||
#include "libc/x/x.h"
|
||||
|
||||
TEST(strsak32, test) {
|
||||
EXPECT_EQ(0, wcslen(L""));
|
||||
EXPECT_EQ(1, wcslen(L"1"));
|
||||
EXPECT_EQ(5, wcslen(L"hello"));
|
||||
}
|
||||
|
||||
BENCH(strsak32, bench) {
|
||||
size_t wcslen_(const wchar_t *) asm("wcslen");
|
||||
wchar_t *p = gc(utf8toutf32(kHyperion, kHyperionSize, 0));
|
||||
EZBENCH_N("wcslen", kHyperionSize, wcslen_(p));
|
||||
for (int i = 128; i >= 2; i /= 2) {
|
||||
p[i - 0] = 0;
|
||||
EZBENCH_N("wcslen", i - 0, wcslen_(p));
|
||||
p[i - 1] = 0;
|
||||
EZBENCH_N("wcslen", i - 1, wcslen_(p));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue