Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
functors and separated compilation
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
Hector Palacios  
View profile   Translate to Translated (View Original)
 More options 6 Nov, 16:12
Newsgroups: fa.caml
Follow-up To: fa.caml
From: Hector Palacios <hector...@gmail.com>
Date: Fri, 6 Nov 2009 08:12:06 -0800 (PST)
Local: Fri 6 Nov 2009 16:12
Subject: functors and separated compilation
I used a Functor for wrapping types with numbers, and then be able to
change easily the representation of repositories: hash-tables,
vectors, etc. This allowed me to use the right data structure for the
right part of the problem without much modification of the source
code. I also used that functor for creating a 'factory', making sure
that each object is only represented once in the whole program, and
making it cheaper to compare them.

The performance now is good enough.

However, everything is one monolitic file and I'm about to distribute
in files all modules and do separate compilation.

Will I lose performance by switching from this monolitic file to
separate files?

I've read in this group that Functor funcions are called always
through their closures, but I suspect there maybe some optimizations
when the module is available in the current compilation unit. Also, I
guess I will have to a more interfaces and it may obfuscate more the
modules and lower the performance.

What would you do?

thanks in advance!


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Hector Palacios  
View profile   Translate to Translated (View Original)
 More options 6 Nov, 16:25
Newsgroups: fa.caml
From: Hector Palacios <hector...@gmail.com>
Date: Fri, 6 Nov 2009 08:25:56 -0800 (PST)
Local: Fri 6 Nov 2009 16:25
Subject: Re: functors and separated compilation
Some other people in this group have reported inlining when using
Functors in the same compilation unit.
Also, some other people reported optimization across different
compilation units that may be relevant to modules and functors.

I would like to know what's OCaml 3.x (x > 10) doing now.

best.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google