Skip to content

⚡️ Speed up function load_json_from_string by 93,682% #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/numpy_pandas/numerical_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import math
from typing import Callable, Union, TYPE_CHECKING
import random
import json

if TYPE_CHECKING:
import numpy as np
Expand Down Expand Up @@ -165,3 +166,8 @@ def bisection_method(
else:
a = c
return (a + b) / 2


def load_json_from_string(json_string: str) -> List[dict]:
obj = json.loads(json_string)
return [obj] * 1000