Skip to content

Commit

Permalink
fix some typos (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
striezel committed Jul 5, 2022
1 parent 75fc91c commit 1d808e0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -28,7 +28,7 @@ This library provide fast Unicode functions such as
- From an UTF-16 string, compute the size of the UTF-32 equivalent string (equivalent to UTF-16 character counting),
- UTF-8 and UTF-16LE character counting.

The functions are accelerated using SIMD instructions (e.g., ARM NEON, SSE, AVX, etc.). When your strings contain hundreds of characters, we can often transcode them at speeds exceeding a billion caracters per second. You should expect high speeds not only with English strings (ASCII) but also Chinese, Japanese, Arabic, and so forth. We handle the full character range (including, for example, emojis).
The functions are accelerated using SIMD instructions (e.g., ARM NEON, SSE, AVX, etc.). When your strings contain hundreds of characters, we can often transcode them at speeds exceeding a billion characters per second. You should expect high speeds not only with English strings (ASCII) but also Chinese, Japanese, Arabic, and so forth. We handle the full character range (including, for example, emojis).

The library compiles down to tens of kilobytes. Our functions are exception-free and non allocating. We have extensive tests.

Expand Down
4 changes: 2 additions & 2 deletions scripts/sse_validate_utf16le_proof.py
Expand Up @@ -38,7 +38,7 @@ def find_error_in_words(words):
prev = None

if words[0] == 'H':
# We assume that our vector algoritm loads proper data into vectors.
# We assume that our vector algorithm loads proper data into vectors.
# In the case low surrogate was the last item in the previous iteration.
return 'high surrogate must not start a chunk'

Expand Down Expand Up @@ -112,7 +112,7 @@ def proof():
case2_hit = True
# all 15 words are valid (either 'V' or pairs 'L', 'H')
# the last words is either 'L' or 'H' (the word will be
# re-examined in the next iteration of an algorihm)
# re-examined in the next iteration of an algorithm)
if words[-1] == 'H':
assert find_error_in_words(words) == 'high surrogate 7 must be preceded by low surrogate'
elif words[-1] == 'L':
Expand Down
12 changes: 6 additions & 6 deletions tests/helpers/transcode_test_base.h
Expand Up @@ -27,7 +27,7 @@ namespace simdutf { namespace tests { namespace helpers {
public:
using GenerateCodepoint = std::function<uint32_t()>;

std::vector<char> input_utf8; // source-encoded mesage: what we're going to transcode
std::vector<char> input_utf8; // source-encoded message: what we're going to transcode
std::vector<char16_t> output_utf16; // what the procedure under test produced
std::vector<char16_t> reference_output_utf16; // what we are expecting

Expand Down Expand Up @@ -81,7 +81,7 @@ namespace simdutf { namespace tests { namespace helpers {
public:
using GenerateCodepoint = std::function<uint32_t()>;

std::vector<char> input_utf8; // source-encoded mesage: what we're going to transcode
std::vector<char> input_utf8; // source-encoded message: what we're going to transcode
std::vector<char32_t> output_utf32; // what the procedure under test produced
std::vector<char32_t> reference_output_utf32; // what we are expecting

Expand Down Expand Up @@ -138,7 +138,7 @@ namespace simdutf { namespace tests { namespace helpers {
std::vector<char> output_utf8; // what the procedure under test produced
std::vector<char> reference_output_utf8; // what we are expecting

std::vector<char16_t> input_utf16; // source-encoded mesage: what we're going to transcode
std::vector<char16_t> input_utf16; // source-encoded message: what we're going to transcode

static constexpr size_t output_size_margin = 0; // extra room for buggy procedures

Expand Down Expand Up @@ -192,7 +192,7 @@ namespace simdutf { namespace tests { namespace helpers {
std::vector<char> output_utf8; // what the procedure under test produced
std::vector<char> reference_output_utf8; // what we are expecting

std::vector<char32_t> input_utf32; // source-encoded mesage: what we're going to transcode
std::vector<char32_t> input_utf32; // source-encoded message: what we're going to transcode

static constexpr size_t output_size_margin = 0; // extra room for buggy procedures

Expand Down Expand Up @@ -246,7 +246,7 @@ namespace simdutf { namespace tests { namespace helpers {
std::vector<char16_t> output_utf16; // what the procedure under test produced
std::vector<char16_t> reference_output_utf16; // what we are expecting

std::vector<char32_t> input_utf32; // source-encoded mesage: what we're going to transcode
std::vector<char32_t> input_utf32; // source-encoded message: what we're going to transcode

static constexpr size_t output_size_margin = 0; // extra room for buggy procedures

Expand Down Expand Up @@ -299,7 +299,7 @@ namespace simdutf { namespace tests { namespace helpers {
std::vector<char32_t> output_utf32; // what the procedure under test produced
std::vector<char32_t> reference_output_utf32; // what we are expecting

std::vector<char16_t> input_utf16; // source-encoded mesage: what we're going to transcode
std::vector<char16_t> input_utf16; // source-encoded message: what we're going to transcode

static constexpr size_t output_size_margin = 0; // extra room for buggy procedures

Expand Down

0 comments on commit 1d808e0

Please sign in to comment.