-
-
Notifications
You must be signed in to change notification settings - Fork 676
Add Array#join and Array#toString + dtoa #275
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
70 commits
Select commit
Hold shift + click to select a range
2a4e550
add Array#toString (WIP)
MaxGraey 9e6c7de
use Array#join for toString internally
MaxGraey e269a0e
update (WIP)
MaxGraey 96125e2
add tests for sub-arrays (WIP)
MaxGraey 1b46367
add definisions
MaxGraey 527a57d
fix tslint
MaxGraey ca2bdeb
update test's builds
MaxGraey 9711df9
disable no-unsafe-any per-line
MaxGraey b918779
refactoring & optimizations
MaxGraey e9baecc
add more tests
MaxGraey 1488301
handle booleans
MaxGraey dbefc9b
improve count digits in itoa
MaxGraey a493326
use faster divede & conquer approach for decimal calculations
MaxGraey 225f55d
refactoring & simplifications for itoa
MaxGraey 4643507
implementing "dtoa" (WIP)
MaxGraey eb00cba
update (wip)
MaxGraey f423094
update (wip)
MaxGraey 3620242
fix lint
MaxGraey f86a863
fix Array#join case for floats
MaxGraey adaf0d3
more fixes
MaxGraey 1ac0920
update (wip)
MaxGraey 4c00ac8
fixes (wip)
MaxGraey dba7761
more fixes (wip)
MaxGraey 7a5ec23
cleanups (wip)
MaxGraey ba78526
minor improvments (wip)
MaxGraey c68f26e
refactoring (wip)
MaxGraey 4dbae43
refactor itoa
MaxGraey 9086bc0
initial tests (wip)
MaxGraey 810a89a
minor optimizations
MaxGraey 2615084
minor improvments & refactoring
MaxGraey 68b2d55
implement prettify for dtoa (wip)
MaxGraey 1e927bd
fix genExponent (wip)
MaxGraey 8d56b54
fix prettify for negative values (wip)
MaxGraey 3d42f0e
update (wip)
MaxGraey 72a86e9
deallocate tmp buffer
MaxGraey c4f1ff8
add basic tests (wip)
MaxGraey 678de64
more tests (wip)
MaxGraey 2c5d49b
more tests + fixes (wip)
MaxGraey 749c34a
more tests (wip)
MaxGraey 430d68d
more tests (wip)
MaxGraey 4190233
cleanups
MaxGraey 013bc0d
minor optimize globals (wip)
MaxGraey b8dfcb2
optimizations
MaxGraey 65cb8a9
minor tweaks
MaxGraey 64187fb
more tweaks
MaxGraey 6939844
add f64 tests for Array#join
MaxGraey a9213e3
improvments (wip)
MaxGraey 1ddbd1e
add basic single float tests for dtoa
MaxGraey 99843d2
add some final comments
MaxGraey 9a6b6f2
finalize
MaxGraey 65a45b8
fix Array#join for references (wip)
MaxGraey d2a6a11
update tests
MaxGraey 36397d9
unify itoa and dtoa in one file "internal/number"
MaxGraey d487877
minor improvments for Array#join (wip)
MaxGraey ca9fa43
optimize bool serialization (wip)
MaxGraey 2bb9514
avoid string concat (wip)
MaxGraey 0fbd6be
fixes (wip)
MaxGraey 293f9a4
avoid string concat (wip)
MaxGraey d24dfdc
minor improvments (wip)
MaxGraey 4bb3da7
fix tslint issues
MaxGraey 3882492
avoid string concat (wip)
MaxGraey c0aaf1b
reuse indexOf for includes and minor refactoring internals
MaxGraey c74c477
avoid string concat progress (wip)
MaxGraey 8c41cde
add more tests (wip)
MaxGraey f78ded0
finalize
MaxGraey e59d192
refactoring
MaxGraey c545609
add more tests for dtoa
MaxGraey 3d95859
add comment about imprecise issue
MaxGraey 4acb8cc
minor refactoring
MaxGraey 46957b1
minor improvment
MaxGraey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
handle booleans
- Loading branch information
commit 1488301d46383d0c97587e3202d2257de17181b8
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without a GC, string concatenation leaves behind unreferenced instances and building the string from scratch using low-level ops might be a better strategy there. Ideally, just the final step, when appending lastIndex, makes a proper string that can be handled by GC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For
itoa
and especiallydtoa
this pretty problematic because I don't forecast actual string length produced after stringify and can't preallocate one buffer. But I could allocate one buffer with maximum possible size. WDYT?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also this will require two pass (interation through array) logic