We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Improves performance by caching functions when creating reusable functions (such as createValidate).
Current Generated Code:
(input: any): typia.IValidation<number> => { const errors = [] as any[]; const __is = (input: any): input is number => { return "number" === typeof input; }; if (false === __is(input)) { ... } const success = 0 === errors.length; return { success, errors, data: success ? input : undefined, } as any; };
Suggesting Code:
(() => { const __is = (input: any): input is number => { return "number" === typeof input; }; return (input: any): typia.IValidation<number> => { const errors = [] as any[]; if (false === __is(input)) { ... } const success = 0 === errors.length; return { success, errors, data: success ? input : undefined, } as any; } })()
I benchmarked createValidate with this interface.
createValidate
interface IMember { id: string & tags.Format<"uuid">; name: string; age: number & tags.Type<"uint32"> & tags.Minimum<20> & tags.ExclusiveMaximum<100>; }
Benchmark Code: https://github.com/miyaji255/Typia-Cached-Fucntion-Benchmark
The text was updated successfully, but these errors were encountered:
Good idea, I'll try this way on weekend.
Sorry, something went wrong.
Adjust samchon/typia#1190: optimization from typia.
typia
9b83739
Performance be tuned significantly.
60e90c2
Merge pull request #1191 from samchon/feature/optimize
ec356a2
Close #1190: optimization by caching internal functions.
Merge pull request #977 from samchon/feature/optimization
a7ac05a
Adjust samchon/typia#1190: optimization from `typia`.
samchon
No branches or pull requests
Feature Request
Improves performance by caching functions when creating reusable functions (such as createValidate).
Simple Example
Current Generated Code:
Suggesting Code:
Benchmark
I benchmarked
createValidate
with this interface.Benchmark Code:
https://github.com/miyaji255/Typia-Cached-Fucntion-Benchmark
The text was updated successfully, but these errors were encountered: