WARNING! Access to this system is limited to authorised users only.
Unauthorised users may be subject to prosecution.
Unauthorised access to this system is a criminal offence under Australian law (Federal Crimes Act 1914 Part VIA)
It is a criminal offence to:
(1) Obtain access to data without authority. -Penalty 2 years imprisonment.
(2) Damage, delete, alter or insert data without authority. -Penalty 10 years imprisonment.
User activity is monitored and recorded. Anyone using this system expressly consents to such monitoring and recording.

To protect your data, the CISO officer has suggested users to enable 2FA as soon as possible.
Currently 2.7% of users enabled 2FA.

Commit a77bdc44 authored by Tobias Pape's avatar Tobias Pape Committed by Stefan Marr
Browse files

Speed up startup/primitive loading by replacing dict with unrolled tuple list

Before:
./som -cp Smalltalk TestSuite/TestHarness.som  0,01s user 0,01s system 4% cpu 0,538 total
After:
./som -cp Smalltalk TestSuite/TestHarness.som  0,01s user 0,01s system 56% cpu 0,027 total
parent 86d632ba
from rpython.rlib.unroll import unrolling_iterable
#
# Captures the known primitives
#
......@@ -31,13 +32,13 @@ def _setup_primitives():
prim_pairs = map(lambda (name, cls):
(name[:name.find("Primitives")], cls),
all_prims)
return dict(prim_pairs)
return prim_pairs
_primitives = _setup_primitives()
_primitives = unrolling_iterable(_setup_primitives())
def primitives_for_class(cls):
key = cls.get_name().get_string()
res = _primitives.get(key, None)
if res is None:
raise PrimitivesNotFound
return res
\ No newline at end of file
name = cls.get_name().get_string()
for key, primitives in _primitives:
if key == name:
return primitives
raise PrimitivesNotFound
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment