213 Commits

Author SHA1 Message Date
Behdad Esfahbod
44235274cd Remove variable that was used once. 2016-07-29 20:31:38 -07:00
Behdad Esfahbod
d201c2c28b Merge pull request #38 from googlei18n/one-last-optimization
One last optimization
2016-07-28 18:04:57 -07:00
Behdad Esfahbod
f899c8ccf8 Combine two more loops
Another 10% speedup.
2016-07-28 17:37:18 -07:00
Behdad Esfahbod
c5a17bb055 Shuffle code in cubic_approx_spline() a bit 2016-07-28 17:10:49 -07:00
Behdad Esfahbod
b305ef49be Another micro-optimization 2016-07-28 16:31:30 -07:00
Behdad Esfahbod
40ebe85d9e Move special-cases of split_cubic_into_n() into it
Surprisingly this doesn't seem to slow down, but also slightly
speed up.
2016-07-28 16:25:58 -07:00
Behdad Esfahbod
ede89847a7 Apply review changes from https://github.com/googlei18n/cu2qu/pull/37 2016-07-28 16:12:00 -07:00
Behdad Esfahbod
701105098b Merge pull request #37 from googlei18n/break-early
Break early
2016-07-28 16:10:13 -07:00
Behdad Esfahbod
223450e8d7 Break out of conversion loop early if a curve fails to convert
Makes the compatible-conversion about 40% faster.
2016-07-28 14:41:33 -07:00
Behdad Esfahbod
39fbd9faba [benchmark] Make output more compact
Also, are the min numbers really useful?
2016-07-28 14:41:33 -07:00
Behdad Esfahbod
54104319f9 Another theoretical optimization 2016-07-28 13:57:17 -07:00
Behdad Esfahbod
de9b9ba3e1 Reduce code duplication 2016-07-28 13:51:11 -07:00
Behdad Esfahbod
77c913ba61 Add keyword-argument hack for 2/3 as well 2016-07-28 13:44:41 -07:00
Behdad Esfahbod
d357503806 Merge pull request #36 from googlei18n/cleanup
Cleanup
2016-07-28 13:35:04 -07:00
James Godfrey-Kittle
d87bbe25fd Typo 2016-07-28 12:51:08 -07:00
James Godfrey-Kittle
c0b6ed92e3 Update/add some rudimentary comments 2016-07-28 12:32:29 -07:00
James Godfrey-Kittle
f7b9ebba06 Move error classes, dot function to top of file 2016-07-28 12:12:22 -07:00
James Godfrey-Kittle
5db64c55aa More vertical whitespace
Style guide says two blank lines between top level functions.
2016-07-28 12:09:52 -07:00
James Godfrey-Kittle
152baa88a5 No lines over 80 characters
This meant going back on my horizontal whitespace around operators
stance, but in this case I think it looks better to reduce whitespace
than to break up the line.
2016-07-28 12:07:44 -07:00
James Godfrey-Kittle
65befad036 Update some comments 2016-07-28 12:03:53 -07:00
James Godfrey-Kittle
8dc57da4ae Remove unnecessary parentheses 2016-07-28 12:00:13 -07:00
James Godfrey-Kittle
e5cf42545b Variable names
In some cases these changes were made for clarity, in some cases more
just for consistency. Anyways we should now have mostly consistent and
reasonably clear variable names everywhere.
2016-07-28 11:56:14 -07:00
James Godfrey-Kittle
3225b1e249 No camelcase
I guess this was done for consistency with names in FontTools, but I
gotta say it was bugging me that some functions in this module used
underscores and some used camelcase. Style guide says underscores.
2016-07-28 11:41:42 -07:00
James Godfrey-Kittle
ccb1a73edd Factor before variable when no whitespace
This is just a consistency thing; see code above change.
2016-07-28 11:37:08 -07:00
James Godfrey-Kittle
746873233b More whitespace around binary operators
This is very subjective, but my preference is more whitespace.
Generally the only place I didn't put in whitespace was for
multiplication within statements that also contained additions,
without parentheses.
2016-07-28 11:35:32 -07:00
James Godfrey-Kittle
847d12180b Get rid of unnecessary decimal points
We import division from __future__, so float division happens by
default.
2016-07-28 11:21:47 -07:00
James Godfrey-Kittle
569872be21 Merge pull request #35 from googlei18n/ufo-benchmark
UFO benchmark module
2016-07-28 10:58:05 -07:00
James Godfrey-Kittle
2a8eb7993e Revert "Change expected test results for travis"
This reverts commit 79beda96a4e26d5d1778f24de673cf14c6bda1ac.

Apparently now Travis expects what my local machine expects. I swear,
Travis is messing with me....
2016-07-27 17:02:44 -07:00
James Godfrey-Kittle
d864619c8b Typo 2016-07-27 16:52:19 -07:00
James Godfrey-Kittle
4d72a44d35 Remove unused code 2016-07-27 16:52:09 -07:00
James Godfrey-Kittle
a91108185f Correct single-segment approximation return 2016-07-27 16:51:45 -07:00
James Godfrey-Kittle
ea08338878 UFO benchmark module 2016-07-27 16:50:57 -07:00
Behdad Esfahbod
8a9cf24429 Fix splitting into one quadratic
Ouch, broke it in 64af3ad4a87 originally.  Caught by James.
2016-07-27 18:53:09 -04:00
James Godfrey-Kittle
d64a3c6619 Show build status in readme 2016-07-27 13:54:27 -07:00
James Godfrey-Kittle
0479616451 Merge pull request #34 from googlei18n/update-tests
Add travis config file
2016-07-27 13:50:59 -07:00
James Godfrey-Kittle
79beda96a4 Change expected test results for travis
This is kind of annoying, because I don't get these results running
the test locally. Hoping it's a user error of some sort on my part.
2016-07-27 13:48:19 -07:00
James Godfrey-Kittle
ac58a7699a Trying to get travis working 2016-07-27 13:43:29 -07:00
James Godfrey-Kittle
d556e8a422 Update expected test results
These have changed with the new conversion method from
https://github.com/googlei18n/cu2qu/pull/33
2016-07-27 13:24:34 -07:00
James Godfrey-Kittle
039e35b212 No error returned from API, update tests 2016-07-27 13:21:47 -07:00
James Godfrey-Kittle
1988c26595 Trying to get travis working 2016-07-27 13:17:55 -07:00
James Godfrey-Kittle
7318a62e80 Trying to get travis working 2016-07-27 13:13:23 -07:00
James Godfrey-Kittle
9626ea9734 Add travis config file 2016-07-27 13:09:58 -07:00
James Godfrey-Kittle
0e10b902a5 Merge pull request #33 from googlei18n/complex-points
Complex points
2016-07-27 13:09:22 -07:00
Behdad Esfahbod
9a2d4b810a Reduce more work 2016-07-26 16:00:49 -04:00
Behdad Esfahbod
f6daaae2f8 Port dot() product to native complex operations
For reference:
http://www.solitaryroad.com/c606.html
2016-07-26 15:43:38 -04:00
Behdad Esfahbod
efb25578a1 Minor 2016-07-25 04:16:02 -04:00
Behdad Esfahbod
0b91ec8024 Remove unuse exception 2016-07-25 04:14:34 -04:00
Behdad Esfahbod
13cd5c3b09 Some more micro-optimization 2016-07-25 04:08:37 -04:00
Behdad Esfahbod
b9dcbb5668 Do some less work! 2016-07-25 04:00:44 -04:00
Behdad Esfahbod
021d8c107d Remove unused code 2016-07-25 03:57:33 -04:00