Skip to content
This repository has been archived by the owner on May 31, 2020. It is now read-only.

Commit

Permalink
remove unnecessary fields and fix benchmarking test
Browse files Browse the repository at this point in the history
  • Loading branch information
patiences committed Jul 3, 2018
1 parent 296eec3 commit 244438f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
5 changes: 0 additions & 5 deletions python/common/org/python/types/Object.java
@@ -1,15 +1,10 @@
package org.python.types;

import java.util.HashMap;

public class Object extends java.lang.RuntimeException implements org.python.Object {
public java.util.Map<java.lang.String, org.python.Object> __dict__;
public org.python.types.Type __class__;
public org.python.types.Type.Origin origin;

public static org.python.Object[] emptyArgs = new org.python.Object[0];
public static java.util.Map<java.lang.String, org.python.Object> emptyKwargs = new HashMap<java.lang.String, org.python.Object>();

/**
* A utility method to update the internal value of this object.
*
Expand Down
8 changes: 3 additions & 5 deletions tests/bench_datatypes.py
Expand Up @@ -55,18 +55,16 @@ def test_empty_calls(test_case):
import time
def get_time():
n = time.clock()+ time.clock - time.clock
n = time.clock()
return n
def get_random():
result = randomish() + randomish() - randomish()
result = get_time() + get_time() - get_time()
return result
result = 0
for i in range(10000000):
for i in range(1000000):
result += get_random()
print(result)
"""), timed=True)

def main():
Expand Down

0 comments on commit 244438f

Please sign in to comment.