#Gleam Rewrite from Dart?

1 messages · Page 1 of 1 (latest)

neon tinsel
#

https://gitlab.com/TricolorHen061/bad-word-blocker-filter/-/tree/main/lib?ref_type=heads

This is my Dart codebase. It's for my Discord bot's message filter. It's really messy, so I want to rewrite it.

I am considering rewriting it in Gleam. However, I was wondering how good of a language Gleam is for this. If you look at the code, there's a lot of dealing with strings, and iterating through enormous lists (200,000+ items). This code will be run about 2-3 times per second. Could Gleam handle this?

cinder thunder
neon tinsel
#

I'm not trying to build my Discord bot in Gleam. That's already done in Dart. 🙂

What I am considering doing is ONLY making the filter in Gleam

cinder thunder
#

Ah I see. Well Gleam can compile to Erlang or JavaScript, if that helps you get a feel for its performance characteristics 🙂

mint wolf
#

if that kind of performance is a concern, I think you'd be unhappy with any garbage collected runtime. maybe rust or some other language with zero overhead memory management?

#

that's definitely some serious volume you're hoping to handle

steady oak
#

I don’t think GC is quite so straightforwardly related. In theory GC should have higher throughput than conventionally manually managed or RC’d memory

#

Manually memory management and RC excel when you need consistency in the overhead, or have tight memory constraints, but in exchange it has a larger performance overhead compared to an appropriate GC so you’ll have less data throughput per minute