Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004808OCamlOCaml generalpublic2009-05-28 15:212012-04-08 19:35
Reporterjerhoud 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusresolvedResolutionsuspended 
PlatformOSOS Version
Product Version3.10.2 
Target VersionFixed in Version 
Summary0004808: better compilation of min and max
DescriptionPervasives functions min and max never get inlined because they are polymorphic.

Using min or max on int values implies 2 function calls (one to min or max and an indirect one to caml_lessequal).

A specialized version of min and max for type int gets inlined in 0000263:0000004 simple assembler instructions.

A nice feature would be that polymorphic functions get inlined using the knowledge of the actual types of the arguments.

If this is too complicated (or not worth the work) perhaps min and max could be special for the compiler (like '<' is)
TagsNo tags attached.
Attached Files

- Relationships
duplicate of 0005541resolved Pervasives.min/max are not inlined 

-  Notes
(0007295)
xleroy (administrator)
2012-04-08 19:35

Suspending this PR for reasons explained in 0005541

- Issue History
Date Modified Username Field Change
2009-05-28 15:21 jerhoud New Issue
2011-05-31 15:10 doligez Status new => acknowledged
2012-04-08 19:34 xleroy Relationship added duplicate of 0005541
2012-04-08 19:35 xleroy Note Added: 0007295
2012-04-08 19:35 xleroy Status acknowledged => resolved
2012-04-08 19:35 xleroy Resolution open => suspended


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker