-
-
Notifications
You must be signed in to change notification settings - Fork 557
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ES6 Number APIs #574
ES6 Number APIs #574
Conversation
lahma
commented
Dec 29, 2018
•
edited
Loading
edited
- quite a lot of work as missing Dtoa functionality now ported to finally fix the issues with toPrecision (ToPrecision() not being evaluated as expected #459)
- the Dtoa code is intentionally C style syntax for it to be easier to diff with v8 code base, so maybe we can be less strict about stylistic issues
- converted builder to be simpler to follow v8 code base and moved formatting to prototype
- unified string builder pool to work like other pools, sharing dtoa builder instance via engine, like pools
- new tests included & passing
d32d2fc
to
94e3251
Compare
e0e62bf
to
a4f536a
Compare
I wonder if we can do better with the SB pool. Now we need to pass (and have) the engine for most type conversions because of it. First question, do we really need a pool of instance, or just one reusable instance, as in "are there recursive calls" that will issue multiple SBs? Should/could the SBs be shared by all Jint engines, using a static pool? I assume it matters in a server scenario only where concurrency is more an issue, but at the same time it could also be an improvement as all threads could reuse the same SB overtime. Another option would be to have a static pool of SB pools, to reduce concurrency by reusing the pools across engine instances. |
… use large enough numbers
9a5317d
to
374b40c
Compare
I've added ConcurrentObjectPool which is the same pool with proper Interlocked support, so now StringBuilderPool is a global pool and API changes including new engine parameter reverted. I think that finding optimal non-concurrent pool might a separate task. |