Branch: Tag:


2011-05-01 00:33:25 by Per Hedbor <>

Use -fvisibility=hidden.

This allows gcc to optimize function calls to globally visible, but not exported
(using PMOD_EXPORT) functions to a direct call. Saves a few % CPU, and also decreases
the size of the binary.

However, it is now important to use PMOD_EXPORT correctly on any system, not only Windows.

It also significantly speeds up loading of dynamic modules, but that does not generally speaking
use any significant amount of CPU anyway.

22:      #define BLOCK_ALLOC(DATA,SIZE) \   struct DATA *PIKE_CONCAT(alloc_,DATA)(void); \ - void PIKE_CONCAT3(new_,DATA,_context)(void); \ - void PIKE_CONCAT(really_free_,DATA)(struct DATA *d); \ + PMOD_EXPORT void PIKE_CONCAT3(new_,DATA,_context)(void); \ + PMOD_EXPORT void PIKE_CONCAT(really_free_,DATA)(struct DATA *d); \   void PIKE_CONCAT3(free_all_,DATA,_blocks)(void); \   void PIKE_CONCAT3(count_memory_in_,DATA,s)(size_t *num, size_t *size); \   void PIKE_CONCAT3(init_,DATA,_blocks)(void)