gleam-lang/gleam
View on GitHubLift literal expressions to top-level constants in JavaScript code generation
Open
#4,090 opened on Dec 17, 2024
help wanted
Description
- make a massive list in gleam
you can use gleam csv package to turn a csv file to gleam list then do io.debug(parssed_csv)
-
make the list be
let list = [ // here will be the long list ] -
do some computation to the data for me it was getting a specific element from the list
-
change the list from
let list =toconst list
(make sure its a process that would take 1 or more seconds so you can notice the difference visually)
i noticed this in a lustre application i needed to get the element number 34 from list number 77 this took 4 seconds just by changing the list to const it was instant
( the version this happened on was 1.5 iirc it good to test if it still happens now )