- 05 Feb, 2020 5 commits
-
-
Eric Myhre authored
(Probably should've done this a while ago. Much earlier in this research branch, I thought the design of Link/LinkBuilder etc might get a review... but at this point, its clear there's plenty of work already do to just sorting out the assembler situation, so any rethinks of links is *definitely* deferred for future investigation (if indeed anything ever happens there at all).) Doing very partial fixes to the example "generated" maps; just enough to compile. I'm not intending to use them as a template for actual codegen later, so their quality is irrelevant at this point.
-
Eric Myhre authored
This removes all the shitty placeholder `panic("no")` calls which previously occupied this area, and gets us one step closer to being at the quality level where we can merge this into core. Also, a short template file to make it easier to stamp out the rest of these for the remaining kinds. No automation; not worth it.
-
Eric Myhre authored
As has been the priority in other cases, the shorter name should be reserved for codegen outputs, as those are where we are optimizing for ergonomics the most.
-
Eric Myhre authored
They don't reduce line count, but they do make lines much shorter, and increase consistency, which are worth it. There's some very similar things already in the codegen system, though under a different name ("kindedRejectionHelper" something). I've realized the utility also exists beyond codegen. Codegen can in the future be updated to use these (and in the process, emit noticably fewer bytes of generated code). (There could be concerns about codegen output getting overly fragile and dependent on core library versions by reusing more code like this. However, I don't think that applies here: It's already going to be fragile if any of the actual error types change; being fragile if the mixins (which are *almost* entirely about those) change is effectively the same thing, it just saves a lot of output size.) I would collapse all these uninteresting methods into one line each rather than three lines each if I could... however, the golang formatter's (rather incogruous?) rule about breaking long lines in this *particular* case strikes. Turns out in this corpus, for example, the `plainInt.LookupSegment` declaration *just* crosses over the length which forces a break, even though none of its siblings do. Sigh.
-
Eric Myhre authored
-
- 03 Feb, 2020 2 commits
-
-
Eric Myhre authored
The previously specified behavior has turned out to be *remarkably* annoying; much more so than I initially expected. It's both not particularly pleasant to handle as a user; and even more unexpectedly, has turned out absolutely infuriating as a library author. (You can see how the early work on these new packages has simply resorted to a placeholder panic there, because the reject-carrying thunks cost an irritating amount of unimportant work.) The mapIteratorReject and listIteratorReject thunks have replicated too many times already, and this count is indicative of a problem: I'm not replicating them again into this new generation of interfaces. Nope. Nuked.
-
Eric Myhre authored
-
- 01 Feb, 2020 1 commit
-
-
Eric Myhre authored
These parts, at least, are super cookie-cutter. Picking them off the shelf and putting them in the "done" bin as I go on the 'any' stuff, which as mentioned in previous commit, is a bit more interesting.
-
- 13 Jan, 2020 1 commit
-
-
Eric Myhre authored
(Thank goodness. Been in theoryland for a while.) There's somewhat more content here than necessary for the benchmark that's presently runnable; right now only the Map_K_T implementation is targetted. I want benchmarks of things with complex keys in codegen and also benchmarks of the runtime/generic/free impls soon, so they can all be compared. There's also a quick fliff of stdlib map usage in a wee benchmark to give us some baselines... And there's also a quick fliff of stdlib json unmarshalling for the same reason. It's not fair, to be sure: the json thing is doing work parsing, and allocating strings (whereas the other two get to use compile-time const strings)... but it sure would be embarassing if we *failed* to beat that speed, right? So it's there to keep it in mind. Some off-the-cuff results: ``` BenchmarkBaselineNativeMapAssignSimpleKeys-8 6815284 175 ns/op 256 B/op 2 allocs/op BenchmarkBaselineJsonUnmarshalMapSimpleKeys-8 724059 1644 ns/op 608 B/op 14 allocs/op BenchmarkFeedGennedMapSimpleKeys-8 2932563 410 ns/op 176 B/op 8 allocs/op ``` This pretty good. If we're *only* half the speed of the native maps... that's actually reallyreally good, considering we're doing more work to keep things ordered, to say nothing of all the other interface support efforts we have to do. But 8 allocs? No. That was not the goal. This should be better. Time to dig...
-