gleam-lang/gleam
在 GitHub 查看Lift literal expressions to top-level constants in JavaScript code generation
Open
#4,090 建立於 2024年12月17日
help wanted
倉庫指標
- Star
- (21,417 star)
- PR 合併指標
- (平均合併 10天 19小時) (30 天內合併 69 個 PR)
描述
- 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 )