Skip to content

H3 library is not inlined #23

Description

@Komzpa

Hi,

Investingating performance issues I found that H3 actively resists inlining.

objdump -D h3.so:

image

Simple math like *pi/180 is not getting inlined.

After some fight I got some pieces but haven't got to destination.

CMake supposedly enables inline like this:

cmake_minimum_required(VERSION 3.9)
cmake_policy(SET CMP0069 NEW)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)

These guys helped a bit inside the h3-pg itself but haven't got me to let linktime optimizations to cross library boundary.

CFLAGS += -flto -O2
LDFLAGS += -flto -Wl,-Bsymbolic-functions -Wl,-z,relro

Any ideas help.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions