Skip to content
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

WIP: Experimental support for integers as JS bigints #404

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

davazp
Copy link
Member

@davazp davazp commented Jun 20, 2021

Just an experiment.

This is work-in-progress and the PR does not work yet.

Copy link
Member

@vlad-km vlad-km left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will try.

How deep is the rabbit hole? :) This can be told by the developers of sbcl, who have 70% code of the NUMBERS this is the difference between integer and bigint.

There are algorithmic features and differences for integer and bigint as well as when working with bits ops.

Adding type checking to a very usable predicate integerp will degrade performance highly likely - It will be necessary to watch.

But probably this should be done in a separate release or use conditional compilation.

bigint implementation in JS is very stranged. :)

And not the last question - how many users this features is expected to have? This is the first question on the topic in 4 years :))))

We will try :)

@vlad-km vlad-km marked this pull request as ready for review June 21, 2021 19:56
@davazp
Copy link
Member Author

davazp commented Jun 22, 2021

But probably this should be done in a separate release or use conditional compilation.

Agreed!

I added a internals.n(5) constructor for integers. We should have some accessors to work with them transparently.

I don't know yet how far is the rabbit hole :-) still fixing errors. I think I'll try to get it to boot a bit more as an experiment, trying to make it conditional, and re-evaluate the strategy later.

@vlad-km
Copy link
Member

vlad-km commented Jun 24, 2021

The question is - will we enter the data type "0n123" for reading by the reader ?

@davazp
Copy link
Member Author

davazp commented Jun 24, 2021

The question is - will we enter the data type "0n123" for reading by the reader ?

No. My plan was to read all integers as bigint (if no decimals point is present) and float otherwise.

@vlad-km
Copy link
Member

vlad-km commented Feb 11, 2022

When do we expect a release?

@davazp
Copy link
Member Author

davazp commented Feb 11, 2022

When do we expect a release?
I am not actively working on it now. But I might resume it later.

Do you think it would be valuable? I can definitely spend a bit more time on it.
Or do you.have interest in experimenting with it yourself?

@vlad-km
Copy link
Member

vlad-km commented Feb 11, 2022

I don't see how to use it. There are not many people who are really involved in this area. And they have other tools.

@vlad-km
Copy link
Member

vlad-km commented Feb 11, 2022

I'm considering issue #420.
And try to measure the depth of the rabbit hole.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants