5 ms·
Played around with this for a minute, interesting find. It seems to trigger a parsing ambiguity, but only for specific forms of that query. Notably, this doe
by rcuv 8y ago
Played around with this for a minute, interesting find. It seems to trigger a parsing ambiguity, but only for specific forms of that query.
Notably, this doesn't happen for other multiplies I randomly plugged in involving a positive and a negative. 2 * -2 has the same slow behavior as well, but if you remove the whitespace from the query, or rewrite the -2 as -(2) or (-2), it runs fast again.
Removing the white space from the query with the -2 as the first value doesn't speed it up, only adding the parens does.
I think the big clue to what's actually going on is on parses that run in the normal amount of time, Google also returns actual search results. I'm guessing the slowness is coming from the search service timing out, but the calculator service still returns, so you still get a result at all.
Good stuff, thanks for sharing.
- imdsm 8y agoIt's amazing that such a simple query could be discovered simply through my self-doubt at multiplying negative numbers.