Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

more extractor#2274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
lemire wants to merge20 commits intomaster
base:master
Choose a base branch
Loading
fromlemire/extractor
Open
Show file tree
Hide file tree
Changes from1 commit
Commits
Show all changes
20 commits
Select commitHold shift + click to select a range
bba2080
object::extract
the-moisrexSep 12, 2024
b4e7d71
Optimize object::extract's performance
the-moisrexSep 12, 2024
142c9a9
Remove unnecessary function call
the-moisrexSep 12, 2024
414c585
noexcept-friendlification of endpoints
the-moisrexSep 13, 2024
dfde6d5
sub
the-moisrexSep 13, 2024
bee5593
Add macro
the-moisrexSep 13, 2024
c343f69
Moving things around to fix msvc error
the-moisrexSep 13, 2024
a4e3e38
Fix msvc and clang and gcc error
the-moisrexSep 13, 2024
c8bde7c
Propagating errors
the-moisrexSep 13, 2024
b4d72ff
explicitly ignoring to fix clang
the-moisrexSep 14, 2024
949bc51
adding benchmark to extractor
lemireSep 21, 2024
677674d
update
lemireSep 21, 2024
f7bf592
Merge pull request #1 from simdjson/extractor_bench
the-moisrexSep 21, 2024
6f19ccb
value_iterator::on_field_raw to optimize object::extract
the-moisrexSep 21, 2024
d9545b2
value_iterator::on_field_raw noexcept
the-moisrexSep 21, 2024
fe6c540
MSVC Fix
the-moisrexSep 21, 2024
207b626
extractor PR with clangcl tweaks
lemireSep 21, 2024
cf86e30
Merge pull request #2 from simdjson/extractor_clangcl
the-moisrexSep 24, 2024
c6fbf5b
moving SIMDJSON_SUPPORTS_EXTRACT
lemireOct 10, 2024
a927fb0
bump
lemireOct 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
value_iterator::on_field_raw noexcept
  • Loading branch information
@the-moisrex
the-moisrex committedSep 21, 2024
commitd9545b2d6e764e53750ce56520d60903a6ba567c
2 changes: 1 addition & 1 deletioninclude/simdjson/generic/ondemand/object-inl.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,7 +24,7 @@ simdjson_inline error_code object::extract(Funcs&&... endpoints)
noexcept((nothrow_endpoint<Funcs> && ...))
#endif
{
return iter.on_field_raw([&](auto field_key, error_code& error) noexcept {
return iter.on_field_raw([&](auto field_key, error_code& error) noexcept((nothrow_endpoint<Funcs> && ...)) {
std::ignore = ((field_key.unsafe_is_equal(endpoints.key()) ? (error = endpoints(value(iter.child()))) == SUCCESS : true) && ...);
if (error) {
return true;
Expand Down
12 changes: 10 additions & 2 deletionsinclude/simdjson/generic/ondemand/value_iterator-inl.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -111,8 +111,16 @@ simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::has_n
}

template <typename Func>
simdjson_warn_unused simdjson_inline error_code value_iterator::on_field_raw(Func&& func) noexcept {
static_assert(std::is_nothrow_invocable_r<bool, Func, raw_json_string, error_code&>::value, "Invalid function provided.");
simdjson_warn_unused simdjson_inline error_code value_iterator::on_field_raw(Func&& func)
#ifdef __cpp_lib_is_invocable
noexcept(std::is_nothrow_invocable_r_v<bool, Func, raw_json_string, error_code&>)
#else
noexcept(false)
#endif
{
#ifdef __cpp_lib_is_invocable
static_assert(std::is_invocable_r_v<bool, Func, raw_json_string, error_code&>, "Invalid function provided.");
#endif

error_code error = SUCCESS;
bool has_value;
Expand Down
17 changes: 16 additions & 1 deletioninclude/simdjson/generic/ondemand/value_iterator.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,6 +6,12 @@
#include "simdjson/generic/implementation_simdjson_result_base.h"
#endif // SIMDJSON_CONDITIONAL_INCLUDE

#ifdef __has_include
#if __has_include (<version>)
#include <version>
#endif
#endif

namespace simdjson {
namespace SIMDJSON_IMPLEMENTATION {
namespace ondemand {
Expand DownExpand Up@@ -201,9 +207,18 @@ class value_iterator {

/**
* Runs Func on each key found.
* Almost same as `find_field_raw` but it runs `func` instead of checking the key ourselves.
*
* @param Func func(raw_json_string key, error_code& error) noexcept
*/
template <typename Func>
simdjson_warn_unused simdjson_inline error_code on_field_raw(Func&& func) noexcept;
simdjson_warn_unused simdjson_inline error_code on_field_raw(Func&& func)
#ifdef __cpp_lib_is_invocable
noexcept(std::is_nothrow_invocable_r_v<bool, Func, raw_json_string, error_code&>)
#else
noexcept(false)
#endif
;

/**
* Find the field with the given key without regard to order, and *without* unescaping.
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp