[{"data":1,"prerenderedAt":418},["ShallowReactive",2],{"project-42168166":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":27,"sentiment":28,"stance_mix":29,"scored_comments":34,"aspects":35,"strip":43,"post_text":45,"what":46,"said":67,"maker_in_thread":119,"shape":128,"grid":133,"attempts":379,"same_week":380,"maker_shows":37,"maker_hidden":410,"reader_version":411,"card":412},"42168166","Nova","Nova JavaScript Engine","title","Show HN: Nova JavaScript Engine","https:\u002F\u002Fgithub.com\u002Ftrynova\u002Fnova","github.com","aapoalas",1731884845,2024,271,102,254,3515,8,"legend","languages","javascript engine","library",[21,24,25,26],"data-oriented design","rust","bytecode interpreter","curious",-0.117,{"positive":30,"neutral":31,"mixed":32,"critical":33},6,25,2,9,42,{"idea":36,"performance":38,"design":40,"execution":42},{"positive":37,"critical":32},1,{"positive":39,"critical":32},0,{"positive":41,"critical":32},3,{"positive":37,"critical":41},[41,41,41,39,41,37,41,41,41,41,41,39,41,41,41,39,44,44,44,44,41,41,37,44,41,37,41,41,37,41,37,37,37,37,39,41,44,41,39,37],5,"We're building a different kind of JavaScript engine, based on data-oriented design and willingness to try something quite out of left field. This is most concretely visible in our major architectural choices:\n\n1. All data allocated on the JavaScript heap is placed into a type-specific vector. Numbers go into the numbers vector, strings into the strings vector, and so on.\n\n2. All heap references are type-discriminated indexes: A heap number is identified by its discriminant value and the index to which it points to in the numbers vector.\n\n3. Objects are also split up into object kind -specific",{"problem":47,"audience":47,"pricing":47,"motivation":48,"time_to_build":47,"stack":55,"openness":65,"stage":66,"team_size":65},null,{"value":49,"source":50,"evidence":51},"Test whether an Entity Component System style design can work for a JavaScript engine","maker",[52],{"id":53,"by":11,"text":54},"42171319","The impetus for the engine design is indeed, as you say, \"someone decided to will it into existence.\" A friend of mine who works in the gaming industry told me about the Entity…",[56],{"value":57,"source":50,"evidence":58},"Rust",[59,62],{"id":60,"by":11,"text":61},"42176198","Nope. It rather explains the memory ownership of a JavaScript heap in a way that Rust understands: The heap owns all data in the heap, and JavaScript objects holding \"references\"…",{"id":63,"by":11,"text":64},"42171479","V8 could probably implement the backing object \"trick\" with some trouble. I'm half-hoping that Nova will show it to be worth their while and that they will eventually do it. It…","unknown","prototype",{"praise":68,"objections":79,"requests":86,"questions":91,"alternatives":101},[69],{"value":70,"source":71,"evidence":72},"Interesting data-oriented architecture ideas","commenter",[73,76],{"id":74,"by":11,"text":75},"42173504","Thank you for the encouragement! Avoiding alignment gaps is indeed pretty great: I have a vision of packing Arrays into 9 bytes split over two or three cache lines. On typed…",{"id":77,"by":11,"text":78},"42176372","Well I'll be damned! That sounds very much like what I want Nova to eventually be :) We don't have fields split apart at present, mostly because Rust doesn't make that quite as…",[80],{"value":81,"source":71,"evidence":82},"Heap vector reallocation and compaction during GC could cause stalls",[83],{"id":84,"by":11,"text":85},"42172071","It is very true that a general purpose computation can theoretically do anything and mess linearity of access patterns entirely up. But in practice programs do most of their work…",[87],{"value":88,"source":50,"evidence":89},"Comparison of this engine design against a traditional one",[90],{"id":77,"by":11,"text":78},[92],{"value":93,"source":71,"evidence":94},"Whether an ECS-like layout helps in practice",[95,98],{"id":96,"by":11,"text":97},"42172370","Thank you very much for your well-wishes \u003C3 > Yes, but note this is still a different pattern of access (array of \"entities\"). I was referring to the `[foo, foo2, foo3]` objects…",{"id":99,"by":11,"text":100},"42175513","Excellent question: In a theoretical sense the answer would be that we cannot know since it depends on the JavaScript being run. But: In practice I think that is indeed the case.…",[102,109,115],{"value":103,"source":71,"evidence":104},"V8",[105,108],{"id":106,"by":11,"text":107},"42171249","That's a good point. The \"Internals of Nova\" blog posts do a bit more explicit comparisons to V8. In V8, and other production engines AFAIK, objects are variable-sized monoliths:…",{"id":63,"by":11,"text":64},{"value":110,"source":50,"evidence":111},"Safari JavaScriptCore",[112],{"id":113,"by":11,"text":114},"42171867","I'm mostly just hoping it won't become necessary, though that is perhaps a vain hope. The reasoning is that, according to my interpretation of talking with some folks working on…",{"value":116,"source":50,"evidence":117},"Ladybird LibJS",[118],{"id":113,"by":11,"text":114},{"comments":120,"answered":121,"key":122},41,24,[123,124,125],{"id":106,"text":107},{"id":53,"text":54},{"id":126,"text":127},"42171694","I guess the opposite could also be asked: Why would a game benefit from ECS? A player in the game can do basically anything, there's no guarantee that things are always perfectly…",{"commenters":129,"max_depth":130,"maker_replies":120,"first_comment_mins":131,"lifespan_hours":132},38,13,688,47,[134,138,140,143,145,149,150,154,155,157,158,161,163,167,169,172,174,176,178,180,182,186,189,192,193,196,198,202,205,208,210,213,215,218,219,222,224,227,228,232,234,238,240,242,244,246,248,250,252,255,257,261,263,266,270,272,275,277,281,283,287,289,292,295,298,300,302,304,308,310,314,316,321,323,327,329,331,333,337,339,342,344,348,350,354,359,361,365,367,369,373,375],[135,39,41,136,137,39],"42171237","project\u002Fneutral\u002Fidea","Etheryte",[106,39,39,139,11,37],"project\u002Fneutral\u002Fdesign",[141,39,41,136,142,39],"42171285","VPenkov",[53,39,39,144,11,37],"maker\u002Fneutral\u002Fidea",[146,39,41,147,148,39],"42171643","project\u002Fneutral\u002Fperformance","kitd",[126,39,39,147,11,37],[151,39,39,152,153,39],"42171985","commenter\u002Fneutral\u002Fperformance","kaoD",[84,39,39,147,11,37],[156,39,39,152,153,39],"42172153",[96,39,39,147,11,37],[159,39,41,139,160,39],"42173584","dinfuehr",[162,39,39,139,11,37],"42174039",[164,39,37,165,166,39],"42177894","project\u002Fcritical\u002Fperformance","munificent",[168,39,39,139,11,37],"42178232",[170,39,41,147,171,39],"42172232","tubs",[173,39,39,147,11,37],"42172386",[175,39,41,147,160,39],"42173654",[177,39,39,147,11,37],"42174127",[179,39,41,147,160,39],"42181796",[181,39,39,147,11,37],"42188335",[183,39,39,184,185,39],"42183007","other\u002Fneutral\u002Fidea","specialist",[187,39,39,188,11,37],"42188356","other\u002Fneutral\u002Fnone",[190,39,41,147,191,39],"42171414","andai",[63,39,39,147,11,37],[194,39,41,136,195,39],"42171538","reverius42",[197,39,39,136,11,37],"42171577",[199,39,39,200,201,39],"42171619","commenter\u002Fneutral\u002Fidea","rob74",[203,39,39,204,11,37],"42171659","maker\u002Fneutral\u002Fnone",[206,39,41,147,207,39],"42171749","Leszek",[209,39,39,147,11,37],"42171757",[211,39,41,147,212,39],"42173066","liontwist",[214,39,41,147,166,39],"42177927",[216,39,41,147,217,39],"42175089","lucms_",[99,39,39,147,11,37],[220,39,39,188,221,39],"42171820","fastball",[223,37,39,139,11,37],"42171298",[225,32,44,226,212,39],"42173207","project\u002Fpositive\u002Fidea",[74,32,39,147,11,37],[229,32,39,230,231,39],"42174861","commenter\u002Fneutral\u002Fdocs","NoahKAndrews",[233,32,39,204,11,37],"42175070",[235,32,44,236,237,39],"42176218","project\u002Fpositive\u002Fdesign","mbrock",[239,32,44,236,237,39],"42176308",[241,32,39,139,11,37],"42176386",[243,32,44,236,237,39],"42176557",[77,32,39,245,11,37],"project\u002Fneutral\u002Fnone",[247,32,39,188,237,39],"42176472",[249,32,39,188,11,37],"42176599",[251,32,41,139,212,39],"42176767",[253,32,41,139,254,39],"42177938","codr7",[256,32,41,147,212,39],"42178815",[258,41,37,259,260,39],"42171567","project\u002Fcritical\u002Fidea","lionkor",[262,41,39,136,11,37],"42171651",[264,41,44,265,260,39],"42175476","maker\u002Fpositive\u002Fnone",[267,268,41,245,269,39],"42173767",4,"aag",[271,268,39,265,11,37],"42173898",[273,44,41,136,274,39],"42171562","gardaani",[276,44,39,136,11,37],"42171608",[278,30,37,279,280,39],"42178995","project\u002Fcritical\u002Fdesign","ridiculous_fish",[282,30,39,139,11,37],"42180001",[284,285,41,136,286,39],"42171371",7,"pavlov",[288,285,39,144,11,37],"42171402",[290,18,41,139,291,39],"42173947","kccqzy",[293,18,39,294,11,37],"42174216","maker\u002Fneutral\u002Fdesign",[296,33,41,139,297,39],"42174728","skybrian",[299,33,39,294,11,37],"42175681",[301,33,37,279,297,39],"42175867",[303,33,39,294,11,37],"42175990",[305,306,41,139,307,39],"42171673",10,"pansa2",[309,306,39,147,11,37],"42171700",[311,306,37,312,313,39],"42171822","maker\u002Fcritical\u002Fperformance","mightyham",[113,306,39,315,11,37],"maker\u002Fneutral\u002Fperformance",[317,318,37,319,320,39],"42175887",11,"project\u002Fcritical\u002Fexecution","throwawaymaths",[60,318,39,322,11,37],"maker\u002Fneutral\u002Fexecution",[324,318,37,325,326,39],"42176380","maker\u002Fcritical\u002Fexecution","int_19h",[328,318,39,322,11,37],"42176580",[330,318,37,325,320,39],"42180981",[332,318,39,322,11,37],"42188436",[334,335,41,147,336,39],"42172557",12,"ad-astra",[338,335,39,315,11,37],"42172603",[340,130,39,188,341,39],"42171587","ksec",[343,130,39,204,11,37],"42171618",[345,346,41,136,347,39],"42172266",14,"PeterWhittaker",[349,346,39,144,11,37],"42172436",[351,346,44,352,353,39],"42174151","maker\u002Fpositive\u002Fexecution","eliassjogreen",[355,356,41,357,358,39],"42174161",15,"project\u002Fmixed\u002Fdesign","ianbicking",[360,356,39,294,11,37],"42175066",[362,363,41,204,364,39],"42172198",16,"Permik",[366,363,39,204,11,37],"42172420",[368,363,39,188,364,39],"42173920",[370,371,37,259,372,39],"42171497",17,"tobr",[374,371,39,144,11,37],"42171533",[376,371,41,377,378,39],"42180134","project\u002Fmixed\u002Fidea","load1n9",[],[381,386,391,396,401,405],{"id":382,"name":383,"points":384,"category":385},"42156977","lanparty.house",1117,"consumer_social",{"id":387,"name":388,"points":389,"category":390},"42174829","FastGraphRAG",457,"ai",{"id":392,"name":393,"points":394,"category":395},"42185668","Black Hole Vision",316,"creative",{"id":397,"name":398,"points":399,"category":400},"42173119","Tips.io",291,"dev_tools",{"id":402,"name":403,"points":404,"category":400},"42197754","Trailimap",279,{"id":406,"name":407,"points":408,"category":409},"42149044","closing.wtf",273,"finance_crypto",false,"v2",{"id":413,"name":5,"line":6,"ai":410,"cat":20,"year":13,"points":14,"comments":15,"rec":27,"s":414,"top":18,"kw":415,"maker":11,"domain":10,"tier":19,"attempts":39,"strip":416,"url":9,"mix":417,"praise":70,"objection":81,"sub":21},42168166,-0.12,[21,24,25,26],"3330313333303330555533153133131111035301",[30,31,32,33],1794036664447]