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

Date and "empty objects" that are not objects.#35

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

Merged
marianoguerra merged 1 commit intomarianoguerra:masterfromjoar:master
Nov 19, 2015

Conversation

joar
Copy link
Contributor

Add support for Date objects and "empty objects" that are not objects.
Uses obj.toString() to display the object.

Also convert "CONSTANTS" to bebitmask-compatible and replaceswitch statement withif statement in order to be able to use bitmasks.

Add support for Date objects and "empty objects" that are not objects.Uses obj.toString() to display the object.
@marianoguerra
Copy link
Owner

hi, thanks for your patch!

just some observations, did you changed to ifs only to use bitmasks? why not just introduce another constant for special objects and keep the switch?

I'm using this lib in a performance sensitive place (hundreds of potentially big objects) and when I update this lib, if my benchmarks show that the if is slower I will revert back to a switch statement.

just want to know if there's a performance reason that I don't know of (I would expect switch to be optimized to a jump table but the "if" solution not, but maybe there's an optimization I'm not aware of)

@joar
Copy link
ContributorAuthor

I chose if..else-if..else because it was more sraight-forward when dealing with bitmasks.

I've put together aperf test which compares the isolated bitmask-in-switch and bitmask-in-if behaviour and the difference is minimal.

marianoguerra added a commit that referenced this pull requestNov 19, 2015
Date and "empty objects" that are not objects.
@marianoguerramarianoguerra merged commitbf42723 intomarianoguerra:masterNov 19, 2015
@marianoguerra
Copy link
Owner

ok, thanks for the perf test and the patch!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@joar@marianoguerra

[8]ページ先頭

©2009-2025 Movatter.jp