File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
graalpython/com.oracle.graal.python.benchmarks/python/host_interop Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
- # Copyright (c) 2024, 2024 , Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2024, 2025 , Oracle and/or its affiliates. All rights reserved.
2
2
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3
3
#
4
4
# The Universal Permissive License (UPL), Version 1.0
42
42
43
43
import polyglot
44
44
import sys
45
- from java .util import List , LinkedList
45
+ from java .util import List , ArrayList
46
46
47
47
@polyglot .interop_type (List )
48
48
class JList :
@@ -65,7 +65,7 @@ def length(self):
65
65
# igv: function_root_create_list_at
66
66
def create_list (num : int , l : JList ):
67
67
for i in range (num ):
68
- l .append (LinkedList ())
68
+ l .append (ArrayList ())
69
69
for j in range (i ):
70
70
l [i ].append (j )
71
71
@@ -74,7 +74,7 @@ def create_list(num: int, l: JList):
74
74
assert li .length () * (li .length () - 1 ) / 2 == li .get_value ()
75
75
76
76
def measure (num ):
77
- j_list = LinkedList ()
77
+ j_list = ArrayList ()
78
78
create_list (num , j_list )
79
79
80
80
def __benchmark__ (num = 2_000 ):
You can’t perform that action at this time.
0 commit comments