Skip to content

Long time initialization of CBinding #104

@foxtran

Description

@foxtran

I have two versions of Julia and CBinding. All tests are done under Ubuntu 20.04, WSL2, Intel(R) Core(TM) i9-10940X CPU @ 3.30GHz.

There are two scripts that have close definitions.

  1. CBinding 0.9.4:
using CBinding

@cstruct {
      x::Int64
      y::Int64
}
  1. CBinding 1.0.9:
using CBinding

c``

c"""
#include <stdint.h>
"""s;

c"""
  struct Point {
      int64_t x;
      int64_t y;
  };
"""j;

Timing (real) of running of some configurations. I got these value by running time julia-ver script.jl

Julia 1.4.1 + CBinding 0.9.4 Julia 1.7.3 + CBinding 0.9.4 Julia 1.7.3 + CBinding 1.0.9
0m1.239s 0m0.948s 0m6.744s
0m1.203s 0m0.989s 0m6.672s
0m1.197s 0m0.972s 0m6.731s
0m1.159s 0m1.027s 0m6.653s
0m1.227s 0m0.987s 0m6.756s

The fastest version of CBinding is 0.9.4 with Julia 1.7.3. The current release is >6 times slower. Is it possible to speed up the upcoming releases?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions