Comments (11)
Updated simdjson to version 0.2.1
from simdjson_php.
@lemire Thanks! I will update the native bindings.
from simdjson_php.
I'm very interested in this update, especially the wider range of CPU support.
I tried to update the amalgamation files to 0.2.1 and submit a PR but ultimately I couldn't make it work.
from simdjson_php.
@1ma What was the issue?
Note: we made minor changes to the simdjson API.
from simdjson_php.
Yup I saw one, ParsedJson::isValid()
was renamed to ParsedJson::is_valid()
.
But I'm not fluent in C/C++, I don't have appropriate tooling for the language and after that I still had to make sense of these errors π https://gist.github.com/1ma/7c7329ff57c9b70b02ad81b326311d08
Moreover, in bindings.h
and bindings.cpp
there is an #ifdef __AVX2__
directive wrapping the whole content of the files that I guess that now should be removed or refactored somehow.
from simdjson_php.
Yes! We donβt require AVX anymore.
from simdjson_php.
I cannot build the latest commit under Alpine Linux 3.10, getting these errors:
$ make
/bin/sh /root/simdjson_php/libtool --mode=compile cc -I. -I/root/simdjson_php -DPHP_ATOM_INC -I/root/simdjson_php/include -I/root/simdjson_php/main -I/root/simdjson_php -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/simdjson_php/simdjson.c -o simdjson.lo
mkdir .libs
cc -I. -I/root/simdjson_php -DPHP_ATOM_INC -I/root/simdjson_php/include -I/root/simdjson_php/main -I/root/simdjson_php -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/simdjson_php/simdjson.c -fPIC -DPIC -o .libs/simdjson.o
In file included from /root/simdjson_php/simdjson.c:23:
/root/simdjson_php/src/bindings.h:25:1: error: unknown type name 'namespace'; did you mean 'isspace'?
namespace simdjsonphp {
^~~~~~~~~
isspace
/root/simdjson_php/src/bindings.h:25:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
namespace simdjsonphp {
^
/root/simdjson_php/src/bindings.h:41:1: error: unknown type name 'bool'; did you mean '_Bool'?
bool cplus_simdjson_isvalid(const char *json);
^~~~
_Bool
/root/simdjson_php/simdjson.c:56:22: error: conflicting types for 'cplus_simdjson_isvalid'
extern unsigned char cplus_simdjson_isvalid(const char *json);
^~~~~~~~~~~~~~~~~~~~~~
In file included from /root/simdjson_php/simdjson.c:23:
/root/simdjson_php/src/bindings.h:41:6: note: previous declaration of 'cplus_simdjson_isvalid' was here
bool cplus_simdjson_isvalid(const char *json);
^~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:193: simdjson.lo] Error 1
Commit a0e942d
from May 29th builds fine.
If you want to try to reproduce, I started from a clean alpine:3.10
Docker container and only needed to install these packages: apk add git build-base php7-dev
from simdjson_php.
@1ma This looks like one is trying to compile C++ as if it were C... right?
from simdjson_php.
@1ma It might be useful to open a distinct issue regarding build problems?
from simdjson_php.
You are right, sorry.
from simdjson_php.
I suggest we close this issue.
from simdjson_php.
Related Issues (20)
- Enable AppVeyor builds HOT 1
- Link to pecl, mention pecl install steps in README
- Make error handling stricter
- Add `simdjson_free_memory(): int` HOT 1
- Patch C simdjson library to use emalloc_safe/efree for depth/byte buffers
- Ignore pathologically large depths such as `simdjson_decode('{}', true, 1000000000)`
- Set up test scripts to compare simdjson_decode and json_decode handling of json edge cases HOT 1
- Throw SimdJsonException extends RuntimeException HOT 1
- Limit worst-case memory for string/depth buffers after simdjson call completes
- simdjson_key_count should properly return sizes larger than 0xFFFFFF(16777215)
- Investigation notes for flag analogous to JSON_BIGINT_AS_STRING HOT 1
- Idea: simdjson_key_info(): ?array
- `parser.allocate` will reallocate buffers - call allocate only to change depth
- Out of memory errors should be real errors
- Use templates to avoid code duplication (e.g. `create_object*` and `create_array*` share code)
- Add composer library /example snippets to make it easier for projects to automatically choose simdjson if supported
- Expose functions using zend_smart_str for PECLs calling simdjson_php bindings
- Idea: Fall back to php's json_decode internally in simdjson_decode for json length > 4 GiB
- Idea: Throw SimdJsonException for a far lower user-provided max depth, in a subsequent major release
- Option for float 4 bit, 8bit, 16bit, 32bit
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simdjson_php.