You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 37 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: feature Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Markus Mottl
Version: 2.99
OS:
Submission from: ballater.dai.ed.ac.uk (129.215.25.79)
Hello,
would it be easily possible to provide for functions in the
"Array"-module which allocate unboxed integer- and float-arrays
without initializing them (similar to "String.create")?
This would allow twice as fast reallocations when implementing
resizable arrays for such data types.
Because this might lead to illegal representations of the numbers,
these functions should probably be in the "unsafe" part.
Best regards,
Markus Mottl
The text was updated successfully, but these errors were encountered:
would it be easily possible to provide for functions in the
"Array"-module which allocate unboxed integer- and float-arrays
without initializing them (similar to "String.create")?
For float arrays, this would be no problem. For int arrays, it's
harder, because those uninitialized int arrays should be tagged
specially so as to prevent the GC from scanning them for pointers.
This special tagging (e.g. as Abstract_tag) would cause generic
polymorphic functions such as equality, hashing and output_value to
produce wrong results.
Because this might lead to illegal representations of the numbers,
these functions should probably be in the "unsafe" part.
Reading from an uninitialized float arrays could certainly return NaNs
("not a number"). The so-called "quiet" NaNs cause no problem, they
just propagate through all floating-point operations. But there might
be some problems with "signalling" NaNs (if the processor implements
them).
Original bug ID: 37
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Markus Mottl
Version: 2.99
OS:
Submission from: ballater.dai.ed.ac.uk (129.215.25.79)
Hello,
would it be easily possible to provide for functions in the
"Array"-module which allocate unboxed integer- and float-arrays
without initializing them (similar to "String.create")?
This would allow twice as fast reallocations when implementing
resizable arrays for such data types.
Because this might lead to illegal representations of the numbers,
these functions should probably be in the "unsafe" part.
Best regards,
Markus Mottl
The text was updated successfully, but these errors were encountered: