Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
I'm wondering if there are any tools to compile a function during runtime. Basically, my situation is this:
I have a function on a data path, where throughput is extremely important. There are a dozen variables (mostly bools, but a couple of ints) and one data type, which will rarely change (maybe every billion or so itterations). What I'd like to do is to compile the function in run time, treating the variables as constants, and get a pointer to an optimized function. I then use that pointer to run the booleans. The function itself does not access hardware, or have any external dependencies, so it would not have to be linked into anything.
I'm working on a Linux system, but I would be curious to know if this is possible on a Windows platform as well.
0 · ·