- 05 Aug, 2018 32 commits
-
-
Kenton Varda authored
-
Kenton Varda authored
Admittedly this is a strict simplification to the code. VS 2017 is fine either way.
-
Kenton Varda authored
-
Kenton Varda authored
-
Kenton Varda authored
I don't know why we've been installing our own. According to this these are already installed: https://www.appveyor.com/docs/build-environment/#mingw-msys-cygwin Also use super-test.sh to test Cygwin; get rid of appveyor-cygwin.sh which tests the wrong thing.
-
Kenton Varda authored
-
Kenton Varda authored
-
Kenton Varda authored
-
Kenton Varda authored
-
Kenton Varda authored
This is true even if the pointer-to-member is never actually used, but only has its type matched, which was what kj::size() was trying to do. Oh well, define some damned constants instead.
-
Kenton Varda authored
It apparently cannot compile properly against libstdc++.
-
Kenton Varda authored
-
Kenton Varda authored
This is stupid, but the GCC maintainers refused to change it: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425 For some reason, KJ's uses of (void) did not warn with GCC 5 but do warn with GCC 7. Supposedly, GCC *never* supported silencing with (void), so there must have been some other bug that caused GCC to fail to trigger the warning previously -- maybe related to the fact that the values being returned are non-trivial types? C++17 introduces `[[nodiscard]]` which is defined as being squelchable using `(void)`, but we're still on C++14, and KJ_UNUSED_RESULT is a post-declaration attribute so can't be defined in terms of the new C++17 attribute even if the compiler supports it. Sigh.
-
Kenton Varda authored
If we were using C++17, we could use [[fallthrough]] instead... but we are not.
-
Kenton Varda authored
-
Kenton Varda authored
-
Kenton Varda authored
-
Kenton Varda authored
-
Kenton Varda authored
-
Kenton Varda authored
-
Kenton Varda authored
-
Kenton Varda authored
-
Kenton Varda authored
-
Kenton Varda authored
So far this is only a small subset of all the STL uses.
-
Kenton Varda authored
I also modified the test runner to print how long each test takes to run, useful for comparing benchmarks.
-
Kenton Varda authored
-
Kenton Varda authored
Hash-based (unordered) and tree-based (ordered) indexing are provided. kj::Table offers advantages over STL: - A Table can have multiple indexes (allowing lookup by multiple keys). Different indexes can use different algorithms (e.g. hash vs. tree) and have different uniqueness constraints. - The properties on which a Table is indexed need not be explicit fields -- they can be computed from the table's row type. - Tables use less memory and make fewer allocations than STL, because rows are stored in a contiguous array. - The hash indexing implementation uses linear probing rather than chaining, which again means far fewer allocations and more cache-friendliness. - The tree indexing implementation uses B-trees optimized for cache line size, whereas STL uses cache-unfriendly and allocation-heavy red-black binary trees. (However, STL trees are overall more cache-friendly; see below.) - Most of the b-tree implementation is not templated. This reduces code bloat, at the cost of some performance due to virtual calls. On an ad hoc benchmark on large tables, the hash index implementation appears to outperform libc++'s `std::unordered_set` by ~60%. However, libc++'s `std::set` still outperforms the B-tree index by ~70%. It looks like the B-tree implementation suffers in part from the fact that keys are not stored inline in the tree nodes, forcing extra memory indirections. This is a price we pay for lower memory usage overall, and the ability to have multiple indexes on one table. The b-tree implementation also suffers somewhat from not being 100% templates, compared to STL, but I think this is a reasonable trade-off. The most performance-critical use cases will use hash indexes anyway.
-
Kenton Varda authored
-
Kenton Varda authored
-
Kenton Varda authored
You need to use a different constructor function, `refTuple()`, to opt into references. Otherwise, it's too easy to construct a tuple of references by mistake.
-
Kenton Varda authored
indexOfType<T, Tuple<...>>() searches the Tuple for a member of type T and returns its index. It fails to compile if there is not exactly one match. TypeOfIndex<i, Tuple<...>> evaluates to the type of the Tuple member at the given index.
-
Kenton Varda authored
I'm tired of working around missing features that were added in C++14. It's four years old now, compilers should support it.
-
- 28 Jul, 2018 1 commit
-
-
Kenton Varda authored
Ignore ECHILD in UnixEventPort::ChildSet::checkExits
-
- 20 Jul, 2018 1 commit
-
-
Oliver Giles authored
If no child process has changed state, waitpid() returns zero. But if there are no more child processes at all, it returns -1 and sets errno to ECHILD. Since checkExits calls waitpid() in a loop, it must ignore ECHILD. +Unit test modified to exhibit the unexpected behaviour.
-
- 16 Jul, 2018 6 commits
-
-
Harris Hancock authored
cmake: drop NO_DEFAULT_PATHS when searching libraries
-
Kenton Varda authored
Add functions for async-signal-safe stringification
-
Kenton Varda authored
-
Kenton Varda authored
-
Kenton Varda authored
Alas, this means we can't use sprintf() anymore. Ugh.
-
Kenton Varda authored
Automatically reduce `Promise<RemotePromise<T>>` -> `RemotePromise<T>`.
-