On Jun 10, 2016 6:04 AM, "Jan Nijtmans" <jan.nijtm...@gmail.com> wrote: > > 2016-06-10 10:12 GMT+02:00 Scott Robison: > > FYI, my test code here (C++ harness) consisted of passing every possible > > four byte buffer to the old function and my new function. My function > > identifies the expected number of "strings" as valid UTF-8. I didn't eyeball > > each one to make sure the right ones got through, but getting the exact > > right number is promising to me. > > > > Let me know if you see anything horridly wrong with my code. It's 2am... > > It turns out that your code appears fine, it's just less efficient than mine ;-)
You are correct. I was going for correct and readable over fast and wrong. {hides} > There were test-failures but all failures turned out to be errors in the > expected test-outcome. I fixed those test-cases now, added more of > them, and fixed the invalid_utf8() function in trunk. Now all tests pass > with both trunk code and your code. > > Many thanks, Scott ! Once more, fossil got better than it was! Glad it's working. I'm all for faster correct code, too. I had run both implementations through the profiler last night and knew my code was a few percent slower, but figured optimization would narrow the gap when I was alert enough to do more good. I'll take the current code and run it through my ugly test harness and make sure it prints the right numbers in a bit.
_______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users