Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004818OCamlOCaml generalpublic2009-06-07 21:442009-09-16 11:45
Reportermottl 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version3.11.0 
Target VersionFixed in Version3.11.2+dev 
Summary0004818: Type alias breaks bigarray access performance
DescriptionThere seems to be a bug optimizing bigarray access when certain bigarray type parameters are supplied via an intermediate type alias. This can lead to a fairly dramatic loss of performance.

The attached file "foo.ml" demonstrates the problem. It can be compiled as follows: ocamlopt bigarray.cmxa foo.ml -o foo

In the submitted form the code will run approx. 5-6 times slower than if you use the commented out line defining type "vec" without an intermediate type alias instead.

It seems to me that the code specializer for bigarray access does not resolve such type aliases correctly and hence chooses the much slower generic access functions.
TagsNo tags attached.
Attached Files? file icon foo.ml [^] (323 bytes) 2009-06-07 21:44 [Show Content]

- Relationships

-  Notes
(0005095)
xleroy (administrator)
2009-09-16 11:45
edited on: 2009-09-16 17:21

Well spotted: indeed, an "expand type abbreviations" was missing in this case. Fixed in 3.11 release branch; will go in 3.11.2.


- Issue History
Date Modified Username Field Change
2009-06-07 21:44 mottl New Issue
2009-06-07 21:44 mottl File Added: foo.ml
2009-09-16 11:45 xleroy Note Added: 0005095
2009-09-16 11:45 xleroy Status new => closed
2009-09-16 11:45 xleroy Resolution open => fixed
2009-09-16 11:45 xleroy Fixed in Version => 3.11.2+dev
2009-09-16 17:21 xleroy Note Edited: 0005095


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker