Optimize custom_code
See original GitHub issueIt would be awesome to optimize custom_code. Sometimes it works slowly.
Current implementation:
def custom_code(mask: str = '@###',
char: str = '@', digit: str = '#') -> str:
code = ''
for p in mask:
if p == char:
code += choice(string.ascii_uppercase)
elif p == digit:
code += str(randint(0, 9))
else:
code += p
return code
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Custom code in Optimizely Web – Support Help Center
Add custom code to your Optimizely experiments. Optimizely lets you use custom JavaScript or CSS code to make powerful changes to your site...
Read more >Optimization Strategies - MATLAB & Simulink - MathWorks
Optimize the execution speed or memory usage of generated code. ... To optimize your generated code further, you can: ... Integrate External/Custom Code....
Read more >Custom Code Guidelines - Website Help
We run PageSpeed optimization on most pages in Website Builder, which can cause issues with your custom code. When troubleshooting code ...
Read more >Using Standard Functionality vs. Creating Custom Code
Standard objects and declarative features—such as approval processes, flows, and workflow ruless—are highly optimized already and don't count against most ...
Read more >Custom Code - FT Optimize
Custom Code. We offer custom development work by the hour and no project is out of scope for our team. Having consulted for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@duckyou Not yet! I’ll do it by myself. Thanks!
Faster than original implementation:
Compare code:
Results: