Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000037OCamlOCaml generalpublic2000-02-14 22:002001-06-25 10:10
Reporteradministrator 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000037: feature wish: uninitialized unboxed arrays
DescriptionFull_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

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0003107)
administrator (administrator)
2000-02-15 17:12

> 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).

Best regards,

- Xavier Leroy

(0003108)
administrator (administrator)
2000-03-26 18:12

The new Bigarray module partially answers this wish.

- Issue History
Date Modified Username Field Change
2005-11-18 10:14 administrator New Issue


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker