Skip to content

[perf] investigate performance issue in convolution #33

@harry0000

Description

@harry0000

Summary

When using the convolution function on Scala Native in problems from the AtCoder Library Practice Contest, some test cases result in an MLE (Memory Limit Exceeded). This issue does not occur on Dotty.

Observed Behavior

Environment:

AtCoder 2023/1 Language Update - Google スプレッドシート

  • Scala 3.3.0 (Scala Native 0.4.14)
  • openjdk-20-jdk-headless

Contest tasks

Submissions

https://atcoder.jp/contests/practice2/submissions/70192779

2024 ms / 1,086,252 KiB

case result time memory
fft_killer_00 MLE 2024 ms 1086064 KiB
fft_killer_01 MLE 1985 ms 1086252 KiB
max_ans_zero_00 MLE 1990 ms 1086044 KiB
max_random_00 MLE 1988 ms 1086100 KiB
max_random_01 MLE 1982 ms 1086116 KiB
random_00 MLE 1851 ms 1079012 KiB
random_01 MLE 1900 ms 1064780 KiB

Hypotheses

  • Memory leak in Scala Native generated code

Steps to Reproduce

Tasks

  • Reproduce and confirm the issue
  • Run profiling (JMH, async-profiler, etc.)
  • Identify bottleneck
  • Propose optimization approach
  • Benchmark optimized version
  • Create pull request

Related

Notes

Previously, the AtCoder administrators uploaded the test cases for the AtCoder Library Practice Contest to Dropbox for me, but the public access has been temporarily suspended, so the test data is currently unavailable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions