mirror of
https://github.com/simdjson/simdjson
synced 2026-06-08 17:27:07 +00:00
de8df0a05f
* Allow -f
* Support parse -s (force sse)
* Simplify flatten_bits
- Add directly to base instead of storing variable
- Don't modify base_ptr after beginning of function
- Eliminate base variable and increment base_ptr instead
* De-unroll the flatten_bits loops
* Decrease dependencies in stage 1
- Do all finalize_structurals work before computing the quote mask; mask
out the quote mask later
- Join find_whitespace_and_structurals and finalize_structurals into
single find_structurals call, to reduce variable leakage
- Rework pseudo_pred algorithm to refer to "primitive" for clarity and some
dependency reduction
- Rename quote_mask to in_string to describe what we're trying to
achieve ("mask" could mean many things)
- Break up find_quote_mask_and_bits into find_quote_mask and
invalid_string_bytes to reduce data leakage (i.e. don't expose quote bits
or odd_ends at all to find_structural_bits)
- Genericize overflow methods "follows" and "follows_odd_sequence" for
descriptiveness and possible lifting into a generic simd parsing library
* Mark branches as likely/unlikely
* Reorder and unroll+interleave stage 1 loop
* Nest the cnt > 16 branch inside cnt > 8
34 lines
1.1 KiB
Bash
34 lines
1.1 KiB
Bash
#!/bin/bash
|
|
|
|
set -e
|
|
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
|
|
|
|
if [ -z "$CHECKPERF_REPOSITORY"]; then CHECKPERF_REPOSITORY=.; fi
|
|
|
|
# Arguments: perfdiff.sh <branch> <test json files>
|
|
if [ -z "$1" ]; then reference_branch="master"; else reference_branch=$1; shift; fi
|
|
if [ -z "$*" ]; then perftests="jsonexamples/twitter.json"; else perftests=$*; fi
|
|
|
|
# Clone and build the reference branch's parse
|
|
echo "Cloning and build the reference branch ($reference_branch) ..."
|
|
current=$SCRIPTPATH/..
|
|
reference=$current/benchbranch/$reference_branch
|
|
rm -rf $reference
|
|
mkdir -p $reference
|
|
git clone --depth 1 -b $reference_branch $CHECKPERF_REPOSITORY $reference
|
|
cd $reference
|
|
make parse
|
|
|
|
# Build the current branch's parse
|
|
echo "Building the current branch ..."
|
|
cd $current
|
|
make clean
|
|
make parse
|
|
|
|
# Run them and diff performance
|
|
make perfdiff
|
|
|
|
echo "Running perfdiff:"
|
|
echo ./perfdiff \"$current/parse -t $perftests $CHECKPERF_ARGS\" \"$reference/parse -t $perftests $CHECKPERF_ARGS\"
|
|
./perfdiff "$current/parse -t $perftests $CHECKPERF_ARGS" "$reference/parse -t $perftests $CHECKPERF_ARGS"
|