Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004818OCaml~DO NOT USE (was: OCaml general)public2009-06-07 21:442009-09-16 11:45
Assigned To 
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 "" demonstrates the problem. It can be compiled as follows: ocamlopt bigarray.cmxa -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 [^] (323 bytes) 2009-06-07 21:44 [Show Content]

- Relationships

-  Notes
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:
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
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker