Skip to content

Commit

Permalink
isASCIIChar
Browse files Browse the repository at this point in the history
  • Loading branch information
wenshao committed Jan 21, 2025
1 parent 8bdd208 commit 4a988db
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ public void direct(Blackhole bh) throws Throwable {
bh.consume(hasNegatives(bytes, 0, bytes.length));
}

@Benchmark
public void isASCIIChar(Blackhole bh) {
bh.consume(com.alibaba.fastjson2.util.IOUtils.isASCII(chars, 0, chars.length));
}


@Benchmark
public void isASCII(Blackhole bh) throws Throwable {
bh.consume(com.alibaba.fastjson2.util.IOUtils.isASCII(bytes, 0, bytes.length));
Expand Down

0 comments on commit 4a988db

Please sign in to comment.