Skip to content

pkgimg alloc count disparity #48898

Open
Open
@daviehh

Description

@daviehh

May be related to #48215

The allocation count when using pkgimg may be off by quite a bit, setup a simple package here to show this issue:

test with

using report_alloc

@time report_alloc.do_ode(); # first JIT run

@time report_alloc.do_ode(); # running compiled

default (no additional arguments/sratup files), i.e. using pkgimg

0.001121 seconds (24.70 k allocations: 1.124 MiB)

with julia --pkgimages=no

0.000862 seconds (10.51 k allocations: 925.016 KiB)

for reference, julia 1.8

0.001279 seconds (10.51 k allocations: 925.094 KiB)

The allocation count is quite higher for the default case (using pkgimg), and the difference may be more pronounced for more complex packages or when more types of function calls are precompiled.

julia> versioninfo()
Julia Version 1.9.0-beta4
Commit b75ddb787ff (2023-02-07 21:53 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin21.5.0)
  CPU: 10 × Apple M1 Pro
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, apple-m1)
  Threads: 1 on 8 virtual cores
Environment:
  JULIA_MATHLINK = /Applications/Mathematica.app/Contents/Frameworks/mathlink.framework
  JULIA_MATHKERNEL = /Applications/Mathematica.app/Contents/MacOS/MathKernel

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behaviorpkgimage

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions