Bug 175697 - Add a Unicode test to RexBench that matches non-BMP characters
Summary: Add a Unicode test to RexBench that matches non-BMP characters
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Michael Saboff
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-08-17 16:29 PDT by Michael Saboff
Modified: 2017-08-17 17:58 PDT (History)
5 users (show)

See Also:


Attachments
Patch (29.45 KB, patch)
2017-08-17 16:43 PDT, Michael Saboff
jfbastien: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Saboff 2017-08-17 16:29:48 PDT
Currently all the Unicode sub tests of RexBench only process BMP characters.  We should add a test that goes beyond BMP characters.
Comment 1 Radar WebKit Bug Importer 2017-08-17 16:30:43 PDT
<rdar://problem/33952865>
Comment 2 Michael Saboff 2017-08-17 16:43:49 PDT
Created attachment 318441 [details]
Patch
Comment 3 JF Bastien 2017-08-17 17:16:27 PDT
Comment on attachment 318441 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=318441&action=review

I didn't check the poker logic. I saw you play, looked about right.

r=me

> PerformanceTests/RexBench/unicode_poker_benchmark.js:51
> +    runUnicodePokerBenchmark = makeBenchmarkRunner(sources, "UnicodePokerBenchmark", 20);

What's the 20 here? numIterations?

> PerformanceTests/RexBench/unicode_poker_benchmark.js:55
> +    name: "Unicode Poker",

UniPoker or Po🂾er

;-)

> PerformanceTests/RexBench/UnicodePoker/benchmark.js:36
> +        Math.random = (function() {

Ha nice :)

> PerformanceTests/RexBench/UnicodePoker/benchmark.js:54
> +        this._players.push(new Player("Player 4"));

Better player names! You could immortalized 4 people in benchmark fame!

> PerformanceTests/RexBench/UnicodePoker/poker.js:71
> +        return cardRank

ASI on purpose here?

> PerformanceTests/RexBench/UnicodePoker/poker.js:128
> +        });

Arrow function here!
Comment 4 Michael Saboff 2017-08-17 17:57:01 PDT
Committed r220893: <http://trac.webkit.org/changeset/220893>
Comment 5 Michael Saboff 2017-08-17 17:58:16 PDT
(In reply to JF Bastien from comment #3)
> Comment on attachment 318441 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=318441&action=review
> 
> I didn't check the poker logic. I saw you play, looked about right.
> 
> r=me
> 
> > PerformanceTests/RexBench/unicode_poker_benchmark.js:51
> > +    runUnicodePokerBenchmark = makeBenchmarkRunner(sources, "UnicodePokerBenchmark", 20);
> 
> What's the 20 here? numIterations?

Yes.

> > PerformanceTests/RexBench/unicode_poker_benchmark.js:55
> > +    name: "Unicode Poker",
> 
> UniPoker or Po🂾er
> 
> ;-)

I changed it to UniPoker.

> > PerformanceTests/RexBench/UnicodePoker/benchmark.js:36
> > +        Math.random = (function() {
> 
> Ha nice :)
> 
> > PerformanceTests/RexBench/UnicodePoker/benchmark.js:54
> > +        this._players.push(new Player("Player 4"));
> 
> Better player names! You could immortalized 4 people in benchmark fame!
> 
> > PerformanceTests/RexBench/UnicodePoker/poker.js:71
> > +        return cardRank
> 
> ASI on purpose here?

I added the missing semicolon.

> > PerformanceTests/RexBench/UnicodePoker/poker.js:128
> > +        });
> 
> Arrow function here!

Done.