Skip to content

Introducing nopython literals. #5

@thautwarm

Description

@thautwarm

Currently we found speeding up the operations on original Python objects are difficult. Actually at this stage there's a great performance loss when using restrain-jit with python objects.

I'm considering about introducing following syntax to support creating native literals:

from restrain_jit.literals import L # make checkers compat with typing
def f(x):
     vec = L@[1, 2, 3] # Julia's Vector{Int}
     tp = L@(1, 2, 3) # Julia's Tuple{Int, Int, Int}
     d = L@{1:2}  # julia's OrderedDict{Int, Int}
     s = L@{1, 2} # julia's OrderedSet{Int}

Metadata

Metadata

Assignees

No one assigned

    Labels

    infrnecessary facilities to runtime restrain-jit

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions