Skip to content

Commit e004bbd

Browse files
Change percentageFaster to timesFaster
1 parent 0eabfac commit e004bbd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

example/src/components/Percentage.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const Percentage: FunctionComponent<Props> = ({ jsiTime, b64Time }) => {
1212
return undefined
1313
}
1414

15-
return ((b64Time - jsiTime) / b64Time) * 100
15+
return b64Time / jsiTime
1616
}, [jsiTime, b64Time])
1717

1818
return (
@@ -21,7 +21,7 @@ export const Percentage: FunctionComponent<Props> = ({ jsiTime, b64Time }) => {
2121
color: fasterPercentage > 0 ? 'green' : 'red',
2222
}}
2323
>
24-
{fasterPercentage ? `${fasterPercentage.toFixed(2)}%` : 'N/A'}
24+
{fasterPercentage ? `x${fasterPercentage.toFixed(2)}` : 'N/A'}
2525
</Text>
2626
)
2727
}

example/src/screens/Results.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const Results: FunctionComponent = () => {
3535
<DataTable.Title>Array size</DataTable.Title>
3636
<DataTable.Title numeric>JSI Time</DataTable.Title>
3737
<DataTable.Title numeric>B64 Time</DataTable.Title>
38-
<DataTable.Title numeric>%</DataTable.Title>
38+
<DataTable.Title numeric>Times faster</DataTable.Title>
3939
</DataTable.Header>
4040

4141
<DataTable.Row>

0 commit comments

Comments
 (0)