- 30 Sep, 2011 7 commits
-
-
Hector Chu authored
Add osyield and usleep as required by recent GC changes. R=golang-dev, r, dsymonds, rsc, r CC=golang-dev https://golang.org/cl/5156042
-
Robert Griesemer authored
Benchmark results (best of 3 runs): old: suffixarray.BenchmarkSaveRestore 1 1931909000 ns/op 28.21 MB/s new: suffixarray.BenchmarkSaveRestore 5 429721800 ns/op 117.14 MB/s R=golang-dev, r CC=golang-dev https://golang.org/cl/5161043
-
Rob Pike authored
Add place holder for runtime.osyield. R=golang-dev CC=golang-dev https://golang.org/cl/5149049
-
Russ Cox authored
Running test/garbage/parser.out. On a 4-core Lenovo X201s (Linux): 31.12u 0.60s 31.74r 1 cpu, no atomics 32.27u 0.58s 32.86r 1 cpu, atomic instructions 33.04u 0.83s 27.47r 2 cpu On a 16-core Xeon (Linux): 33.08u 0.65s 33.80r 1 cpu, no atomics 34.87u 1.12s 29.60r 2 cpu 36.00u 1.87s 28.43r 3 cpu 36.46u 2.34s 27.10r 4 cpu 38.28u 3.85s 26.92r 5 cpu 37.72u 5.25s 26.73r 6 cpu 39.63u 7.11s 26.95r 7 cpu 39.67u 8.10s 26.68r 8 cpu On a 2-core MacBook Pro Core 2 Duo 2.26 (circa 2009, MacBookPro5,5): 39.43u 1.45s 41.27r 1 cpu, no atomics 43.98u 2.95s 38.69r 2 cpu On a 2-core Mac Mini Core 2 Duo 1.83 (circa 2008; Macmini2,1): 48.81u 2.12s 51.76r 1 cpu, no atomics 57.15u 4.72s 51.54r 2 cpu The handoff algorithm is really only good for two cores. Beyond that we will need to so something more sophisticated, like have each core hand off to the next one, around a circle. Even so, the code is a good checkpoint; for now we'll limit the number of gc procs to at most 2. R=dvyukov CC=golang-dev https://golang.org/cl/4641082
-
Mike Samuel authored
This is a possible optimization. I'm not sure the complexity is worth it. The new benchmark in escape_test is 46us without and 35us with the optimization. R=nigeltao CC=golang-dev https://golang.org/cl/5168041
-
Nigel Tao authored
R=adg TBR=adg CC=golang-dev https://golang.org/cl/5154046
-
Mike Samuel authored
This removes a few cases from escapeAction and clarifies the responsibilities of urlFilter which no longer does any escaping or normalization. It is now solely a filter. R=nigeltao CC=golang-dev https://golang.org/cl/5162043
-
- 29 Sep, 2011 10 commits
-
-
Brad Fitzpatrick authored
R=gustavo, rsc, borman, dave, kevlar, nigeltao, dvyukov, kardianos, fw, r, r, david.crawshaw CC=golang-dev https://golang.org/cl/4973055
-
Brad Fitzpatrick authored
... protects this optimization from future well-meaning Gophers looking to delete unused code. :) R=gri CC=golang-dev https://golang.org/cl/5165041
-
Ian Lance Taylor authored
R=gri CC=golang-dev https://golang.org/cl/5164041
-
Luuk van Dijk authored
The type to cast the elements to was stolen from a field that's no longer there. R=rsc CC=golang-dev https://golang.org/cl/5143050
-
Rob Pike authored
Simpler concept, and it turns a queue into a stack. Speeds up benchmarks noticeably. Before: fmt_test.BenchmarkSprintfEmpty 10000000 282 ns/op fmt_test.BenchmarkSprintfString 2000000 910 ns/op fmt_test.BenchmarkSprintfInt 5000000 723 ns/op fmt_test.BenchmarkSprintfIntInt 1000000 1071 ns/op fmt_test.BenchmarkSprintfPrefixedInt 1000000 1108 ns/op fmt_test.BenchmarkScanInts 1000 2239510 ns/op fmt_test.BenchmarkScanRecursiveInt 1000 2365432 ns/op After: fmt_test.BenchmarkSprintfEmpty 10000000 232 ns/op fmt_test.BenchmarkSprintfString 2000000 837 ns/op fmt_test.BenchmarkSprintfInt 5000000 590 ns/op fmt_test.BenchmarkSprintfIntInt 2000000 910 ns/op fmt_test.BenchmarkSprintfPrefixedInt 2000000 996 ns/op fmt_test.BenchmarkScanInts 1000 2210715 ns/op fmt_test.BenchmarkScanRecursiveInt 1000 2367800 ns/op R=rsc, r CC=golang-dev https://golang.org/cl/5151044
-
Rob Pike authored
The letter is a holdover from C and unnecessary in Go. Gofix module included. Fixes #2306. R=golang-dev, gri, dsymonds CC=golang-dev https://golang.org/cl/5158043
-
Robert Griesemer authored
R=rsc CC=golang-dev https://golang.org/cl/5163041
-
Russ Cox authored
R=ken2 CC=golang-dev https://golang.org/cl/5161041
-
Robert Griesemer authored
R=rsc, r, nigeltao, r, dsymonds CC=golang-dev https://golang.org/cl/5146048
-
Russ Cox authored
R=golang-dev, bradfitz, r CC=golang-dev https://golang.org/cl/5141051
-
- 28 Sep, 2011 10 commits
-
-
Mike Samuel authored
HTML5 allows embedded SVG and MathML. Code searches show SVG is used for graphing. This changes transition to deal with constructs like <svg xmlns:xlink="http://www.w3.org/1999/xlink"> It changes attr and clients to call a single function that combines the name lookup and "on" prefix check to determine an attribute value type given an attribute name. That function uses heuristics to recognize that xlink:href and svg:href have URL content, and that data-url is likely contains URL content, since "javascript:" injection is such a problem. I did a code search over a closure templates codebase to determine patterns of custom attribute usage. I did something like $ find . -name \*.soy | \ xargs egrep perl -ne 'while (s/\b((data-|\w+:)\w+)\s*=//) { print "$1\n"; }' | \ sort | uniq to produce the list at the bottom. Filtering that by egrep -i 'src|url|uri' produces data-docConsumptionUri data-docIconUrl data-launchUrl data-lazySrc data-pageUrl data-shareurl data-suggestServerUrl data-tweetUrl g:secondaryurls g:url which seem to match all the ones that are likely URL content. There are some short words that match that heuristic, but I still think it decent since any custom attribute that has a numeric or enumerated keyword value will be unaffected by the URL assumption. Counterexamples from /usr/share/dict: during, hourly, maturity, nourish, purloin, security, surly Custom attributes present in existing closure templates codebase: buzz:aid data-a data-action data-actor data-allowEqualityOps data-analyticsId data-bid data-c data-cartId data-categoryId data-cid data-command data-count data-country data-creativeId data-cssToken data-dest data-docAttribution data-docConsumptionUri data-docCurrencyCode data-docIconUrl data-docId data-docPrice data-docPriceMicros data-docTitle data-docType data-docid data-email data-entityid data-errorindex data-f data-feature data-fgid data-filter data-fireEvent data-followable data-followed data-hashChange data-height data-hover data-href data-id data-index data-invitable data-isFree data-isPurchased data-jid data-jumpid data-launchUrl data-lazySrc data-listType data-maxVisiblePages data-name data-nid data-nodeid data-numItems data-numPerPage data-offerType data-oid data-opUsesEquality data-overflowclass data-packageName data-pageId data-pageUrl data-pos data-priceBrief data-profileIds data-query data-rating data-ref data-rentalGrantPeriodDays data-rentalactivePeriodHours data-reviewId data-role data-score data-shareurl data-showGeLe data-showLineInclude data-size data-sortval data-suggestServerType data-suggestServerUrl data-suggestionIndex data-tabBarId data-tabBarIndex data-tags data-target data-textColor data-theme data-title data-toggletarget data-tooltip data-trailerId data-transactionId data-transition data-ts data-tweetContent data-tweetUrl data-type data-useAjax data-value data-width data-x dm:index dm:type g:aspects g:decorateusingsecondary g:em g:entity g:groups g:id g:istoplevel g:li g:numresults g:oid g:parentId g:pl g:pt g:rating_override g:secondaryurls g:sortby g:startindex g:target g:type g:url g:value ga:barsize ga:css ga:expandAfterCharsExceed ga:initialNumRows ga:nocancelicon ga:numRowsToExpandTo ga:type ga:unlockwhenrated gw:address gw:businessname gw:comment gw:phone gw:source ng:controller xlink:href xml:lang xmlns:atom xmlns:dc xmlns:jstd xmlns:ng xmlns:og xmlns:webstore xmlns:xlink R=nigeltao CC=golang-dev https://golang.org/cl/5119041
-
Mike Samuel authored
The normalization that prevents element name and comment injection in <{{.}} by converting it to <{{.}} breaks <!DOCTYPE html> Instead of splitting states to have a start of document state and a text state, I whitelist <!DOCTYPE. R=nigeltao CC=golang-dev https://golang.org/cl/5131051
-
Russ Cox authored
*** This is a design review, not a code review. *** Feel free to reply to the mail instead of picking out individual lines to comment on in Rietveld. This command, go, will replace both gomake/make and goinstall. Make will stick around only for building our C commands and perhaps package runtime. In normal use while developing you'd run commands like go compile go test go clean go install which apply to the package in the current directory. To operate on code written by others, you add an explicit package path: go get gopath.googlecode.com/hg/oauth go test gopath.googlecode.com/hg/oauth The script.txt file is a script showing the output of the various help commands that the command has. (Right now, all the command can do is print help messages.) R=golang-dev, bradfitz, kevlar, r, edsrzf, gri, adg, rogpeppe, r CC=golang-dev https://golang.org/cl/5019045
-
Brad Fitzpatrick authored
This is just a new API to do many replacements at once. While the point of this API is to be faster than doing replacements one at a time, the implementation in this CL has the optimizations removed and may actually be slower. Future CLs will bring back & add optimizations. R=r, rsc, rogpeppe CC=golang-dev https://golang.org/cl/5081042
-
Brad Fitzpatrick authored
Fixes #2312 R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/5143049
-
Russ Cox authored
R=golang-dev, bradfitz, iant CC=golang-dev https://golang.org/cl/5127043
-
Russ Cox authored
MatchEasy0_1K 500000 4207 ns/op 243.35 MB/s MatchEasy0_1K_Old 500000 4625 ns/op 221.40 MB/s MatchEasy0_1M 500 3948932 ns/op 265.53 MB/s MatchEasy0_1M_Old 500 3943926 ns/op 265.87 MB/s MatchEasy0_32K 10000 122974 ns/op 266.46 MB/s MatchEasy0_32K_Old 10000 123270 ns/op 265.82 MB/s MatchEasy0_32M 10 127265400 ns/op 263.66 MB/s MatchEasy0_32M_Old 10 127123500 ns/op 263.95 MB/s MatchEasy1_1K 500000 5637 ns/op 181.63 MB/s MatchEasy1_1K_Old 10000 100690 ns/op 10.17 MB/s MatchEasy1_1M 200 7683150 ns/op 136.48 MB/s MatchEasy1_1M_Old 10 145774000 ns/op 7.19 MB/s MatchEasy1_32K 10000 239887 ns/op 136.60 MB/s MatchEasy1_32K_Old 500 4508182 ns/op 7.27 MB/s MatchEasy1_32M 10 247103500 ns/op 135.79 MB/s MatchEasy1_32M_Old 1 4660191000 ns/op 7.20 MB/s MatchMedium_1K 10000 160567 ns/op 6.38 MB/s MatchMedium_1K_Old 10000 158367 ns/op 6.47 MB/s MatchMedium_1M 10 162928000 ns/op 6.44 MB/s MatchMedium_1M_Old 10 159699200 ns/op 6.57 MB/s MatchMedium_32K 500 5090758 ns/op 6.44 MB/s MatchMedium_32K_Old 500 5005800 ns/op 6.55 MB/s MatchMedium_32M 1 5233973000 ns/op 6.41 MB/s MatchMedium_32M_Old 1 5109676000 ns/op 6.57 MB/s MatchHard_1K 10000 249087 ns/op 4.11 MB/s MatchHard_1K_Old 5000 364569 ns/op 2.81 MB/s MatchHard_1M 5 256050000 ns/op 4.10 MB/s MatchHard_1M_Old 5 372446400 ns/op 2.82 MB/s MatchHard_32K 200 7944525 ns/op 4.12 MB/s MatchHard_32K_Old 100 11609380 ns/op 2.82 MB/s MatchHard_32M 1 8144503000 ns/op 4.12 MB/s MatchHard_32M_Old 1 11885434000 ns/op 2.82 MB/s R=r, bradfitz CC=golang-dev https://golang.org/cl/5134049
-
Yasuhiro Matsumoto authored
Fixes #2243. R=rsc CC=golang-dev https://golang.org/cl/5146041
-
Brad Fitzpatrick authored
R=golang-dev, rsc, iant CC=golang-dev https://golang.org/cl/5136052
-
Mike Samuel authored
In {{$x := . | foo}} {{$x}} the first action is a variable assignment that contributes nothing to the output while the first is a use that needs to be escaped. This CL fixes escapeAction to distinguish assignments from interpolations and to only modify interpolations. R=nigeltao, r CC=golang-dev https://golang.org/cl/5143048
-
- 27 Sep, 2011 8 commits
-
-
Robert Griesemer authored
CL 5040041 (https://golang.org/cl/5040041) changed the use of []int to []int32 internally so that encoding/binary could be used. This is no longer needed (gobs can encode ints), and using []int is more in sync w/ the semantics of the data structure (the index elements are indices which are ints). Changing it back. R=r CC=golang-dev https://golang.org/cl/5141049
-
Mike Samuel authored
Does some TODOs and changes the term "div" in an error message to "division" to avoid confusion with "<div>". R=nigeltao, r CC=golang-dev https://golang.org/cl/5141047
-
Rob Pike authored
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5136047
-
Rob Pike authored
Error found by govet. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5142048
-
Russ Cox authored
Fixes #2308. R=agl, gri CC=golang-dev https://golang.org/cl/5121052
-
Russ Cox authored
TBR=bradfitz CC=golang-dev https://golang.org/cl/5124049
-
Ian Lance Taylor authored
Fixes #2309. R=rsc, bradfitz CC=golang-dev https://golang.org/cl/5128053
-
Robert Griesemer authored
- don't use range over string to copy string bytes - some code simplification R=mpvl CC=golang-dev https://golang.org/cl/5144044
-
- 26 Sep, 2011 5 commits
-
-
Russ Cox authored
R=golang-dev, r CC=golang-dev, ukai https://golang.org/cl/5140046
-
Russ Cox authored
R=golang-dev, r, r CC=golang-dev https://golang.org/cl/5123047
-
Russ Cox authored
Add copyright notice to nilptr.go. R=golang-dev, r CC=golang-dev https://golang.org/cl/5139048
-
Rob Pike authored
Fixes #2301. R=golang-dev, gri CC=golang-dev https://golang.org/cl/5134048
-
Russ Cox authored
R=golang-dev, r CC=golang-dev https://golang.org/cl/5127042
-