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

compare functions in stdlib not specialized #4194

Closed
vicuna opened this issue Jan 11, 2007 · 2 comments
Closed

compare functions in stdlib not specialized #4194

vicuna opened this issue Jan 11, 2007 · 2 comments
Assignees
Labels

Comments

@vicuna
Copy link

vicuna commented Jan 11, 2007

Original bug ID: 4194
Reporter: @oandrieu
Assigned to: @xavierleroy
Status: closed (set by @xavierleroy on 2007-01-30T09:52:17Z)
Resolution: fixed
Priority: normal
Severity: tweak
Version: 3.10+dev
Category: ~DO NOT USE (was: OCaml general)
Related to: #4077
Parent of: #5244

Bug description

Modules Int32, Int64, Nativeint and String have a compare function but it is not specialized. It always calls the generic caml_compare instead of caml_int32_compare, caml_int64_compare, etc.

cf. bug #4077 also

File attachments

@vicuna
Copy link
Author

vicuna commented Jan 30, 2007

Comment author: @oandrieu

On second thoughts, that may not be good idea for strings: caml_compare first tests physical equality whereas caml_string_compare always uses memcmp.

Maybe caml_string_compare should first test with == too ?

@vicuna
Copy link
Author

vicuna commented Jan 30, 2007

Comment author: @xavierleroy

Fixed as suggested in CVS trunk, will be in 3.10.
Also added == fast case to caml_string_equal and caml_string_compare.

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

No branches or pull requests

2 participants