[{"data":1,"prerenderedAt":313},["ShallowReactive",2],{"project-49623398":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":29,"sentiment":30,"stance_mix":31,"scored_comments":36,"aspects":37,"strip":44,"post_text":46,"what":47,"said":67,"maker_in_thread":149,"shape":160,"grid":165,"attempts":274,"same_week":275,"maker_shows":40,"maker_hidden":305,"reader_version":306,"card":307},"49623398","Fast Polynomials","Compute polynomials twice as fast","title","Show HN: Compute polynomials twice as fast","https:\u002F\u002Fthomasahle.com\u002Ffast-polynomials\u002F","thomasahle.com","thomasahle",1788944038,2026,139,42,467,4366,11,"notable","learning_science","algorithms reference","web_app",[24,25,26,27,28],"polynomial evaluation","horner scheme","estrin method","universal hashing","multiplication count","curious",-0.034,{"positive":32,"neutral":33,"mixed":34,"critical":35},3,8,1,4,16,{"design":38,"idea":39,"performance":42,"docs":43},{"positive":34,"critical":34},{"positive":40,"critical":41},2,0,{"positive":41,"critical":32},{"positive":41,"critical":41},[45,41,32,41,32,41,41,45,41,41,34,32,34,41,45,32,32,34,41,41,41,41,34,41,41,32,41,41,41,41,41,41,41,41,41,41,32,41,32,32],5,"A few years ago my coauthor and I was wondering if we could reduce the number of multiplications used for hashing algorithms. We had a construction and a 100 page proof, but we were not 100% sure it was correct. Now we have a full Lean proof, so we decided to publish it.\n\nI made this website to make it easy for anyone how has polynomials to evaluate to see how it would be done using our method, as well as a number of previous approaches by Knuth and others.",{"problem":48,"audience":54,"pricing":58,"motivation":59,"time_to_build":58,"stack":63,"openness":64,"stage":65,"team_size":66},{"value":49,"source":50,"evidence":51},"Evaluating polynomials with fewer multiplications.","maker",[52],{"id":53},"post",{"value":55,"source":50,"evidence":56},"Anyone who needs to evaluate polynomials, such as hash and approximation implementers.",[57],{"id":53},null,{"value":60,"source":50,"evidence":61},"Coauthor and maker wanted to reduce multiplications in hashing and publish a Lean-verified proof.",[62],{"id":53},[],"unknown","launched","team",{"praise":68,"objections":84,"requests":99,"questions":111,"alternatives":126},[69,77],{"value":70,"source":71,"evidence":72},"Interactive demo is useful for learning evaluation methods.","commenter",[73],{"id":74,"by":75,"text":76},"49639199","pvillano","This is super cool. I learned a lot playing with the demo. I only knew Horner and Estrin, but I think I've gotten a grasp on most of them. One small change I'd recommend is for…",{"value":78,"source":71,"evidence":79},"Lean proof makes the bound trustworthy.",[80],{"id":81,"by":82,"text":83},"49669645","lee_ward","The Lean proof is the interesting part. A 100-page construction nobody's sure about becomes something you can trust when the multiplication-count bound is machine-checked.",[85,92],{"value":86,"source":71,"evidence":87},"Preprocessing cost may outweigh gains for hashing.",[88],{"id":89,"by":90,"text":91},"49639084","adrian_b","It is applicable, but it is not useful. Universal hashes use the input text as the set of coefficients. This method requires additional preprocessing of the coefficients, before…",{"value":93,"source":71,"evidence":94},"Heuristic hashes like xxh3 may still be faster.",[95],{"id":96,"by":97,"text":98},"49647064","vlovich123","You benchmarked a really old heuristic hash in Murmur and xxh64. xxh3 is ~1.6x to 1.8x faster than xxh64 - extrapolating that to 5.7 in your paper puts it at ~18-27% faster.…",[100,104],{"value":101,"source":71,"evidence":102},"Separate source nodes for x, x^2, x^4 in the graph view.",[103],{"id":74,"by":75,"text":76},{"value":105,"source":71,"evidence":106},"Fix the monic toggle that resets when switching methods.",[107],{"id":108,"by":109,"text":110},"49637634","voxelghost","It keeps flipping back to 'monic' from e.g. 'ln(1+x)' when switching between algorithms, and then seems to lock to 'monic'? (Am I missing something?) Also I am curious, in your…",[112,119],{"value":113,"source":71,"evidence":114},"Tradeoff between multiplication and addition cost.",[115],{"id":116,"by":117,"text":118},"49637655","gowld","What is the tradeoff between multiplication and addition?",{"value":120,"source":71,"evidence":121},"Why not use FFT for multipoint evaluation.",[122],{"id":123,"by":124,"text":125},"49639123","throwaway81523","If you're going to preprocess the polynomial, maybe you want to evaluate it at many different points. But then why not use the FFT?",[127,131,137,143],{"value":128,"source":71,"evidence":129},"Horner's method",[130],{"id":74,"by":75,"text":76},{"value":132,"source":50,"evidence":133},"Estrin's method",[134],{"id":135,"by":11,"text":136},"49639101","If you are working over floating point, you probably with to use Estrin's method (see https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FEstrin%27s_scheme - also tab 3 on the website.) It takes…",{"value":138,"source":50,"evidence":139},"Rabin-Winograd",[140],{"id":141,"by":11,"text":142},"49639233","Thank you! It was a lot of fun to make the website and see all the methods in practice after having just looked at the theory for a long time :D > have a separate source node for…",{"value":144,"source":71,"evidence":145},"xxh3 and wyhash",[146],{"id":147,"by":97,"text":148},"49637627","Would this be applicable to fast hashes like WyHash and xxh3 or are those not using polynomials? Is this mainly for faster cryptographic hashes?",{"comments":150,"answered":151,"key":152},15,6,[153,154,157],{"id":141,"text":142},{"id":155,"text":156},"49654243","I'm happy to take a PR if you have a good layout in mind!",{"id":158,"text":159},"49641524","I'm not sure, since we only do univariate polynomials and k-path has lots of variables, right? But maybe this work can inspire looking for other small, constant factor saving…",{"commenters":161,"max_depth":162,"maker_replies":150,"first_comment_mins":163,"lifespan_hours":164},21,10,1045,70,[166,168,170,173,174,178,180,184,187,189,191,193,195,199,202,203,205,209,210,212,215,217,220,223,224,227,230,231,233,236,239,242,245,248,249,253,255,258,262,264,268,271],[74,41,45,167,75,41],"project\u002Fpositive\u002Fdesign",[141,41,41,169,11,34],"maker\u002Fneutral\u002Fdesign",[171,41,32,172,75,41],"49649788","project\u002Fneutral\u002Fdesign",[155,41,41,169,11,34],[175,34,32,176,177,41],"49640320","project\u002Fneutral\u002Fidea","emil-lp",[158,34,41,179,11,34],"maker\u002Fneutral\u002Fidea",[181,40,41,182,183,41],"49645301","other\u002Fneutral\u002Fdocs","guyomes",[185,32,45,186,117,41],"49637690","project\u002Fpositive\u002Fidea",[188,32,41,186,11,34],"49639054",[190,32,41,176,11,34],"49656436",[108,35,34,192,109,41],"project\u002Fcritical\u002Fdesign",[194,35,32,172,117,41],"49637716",[196,45,34,197,198,41],"49640814","project\u002Fcritical\u002Fperformance","IsTom",[200,45,41,201,11,34],"49640887","maker\u002Fneutral\u002Fperformance",[81,151,45,186,82,41],[147,204,32,176,97,41],7,[206,204,32,207,208,41],"49638636","project\u002Fmixed\u002Fperformance","orlp",[89,204,34,197,90,41],[211,204,41,179,11,34],"49639499",[213,204,41,214,90,41],"49640046","commenter\u002Fneutral\u002Fidea",[216,204,41,214,11,34],"49641080",[218,204,41,219,90,41],"49641379","commenter\u002Fneutral\u002Fperformance",[221,204,41,222,11,34],"49644322","project\u002Fpositive\u002Fperformance",[96,204,34,197,97,41],[225,204,41,226,11,34],"49654235","commenter\u002Fcritical\u002Fperformance",[228,204,41,229,11,34],"49638999","project\u002Fneutral\u002Fprivacy",[123,33,32,176,124,41],[232,33,41,179,11,34],"49639202",[116,234,41,235,117,41],9,"other\u002Fneutral\u002Fnone",[237,234,41,235,238,41],"49637793","gigatexal",[240,234,41,235,241,41],"49637878","hyperhello",[243,234,41,235,244,41],"49638053","nraynaud",[246,234,41,235,247,41],"49639329","ack_complete",[135,234,41,201,11,34],[250,234,41,251,252,41],"49639159","other\u002Fneutral\u002Fperformance","LegionMammal978",[254,234,41,251,90,41],"49639161",[256,234,41,251,257,41],"49640072","Someone",[259,162,32,260,261,41],"49637543","project\u002Fneutral\u002Fperformance","aetherspawn",[263,162,41,179,11,34],"49639191",[265,18,32,266,267,41],"49641201","project\u002Fneutral\u002Fdocs","huhtenberg",[269,18,32,266,270,41],"49641368","NooneAtAll3",[272,273,41,266,11,34],"49639268",12,[],[276,281,286,290,295,300],{"id":277,"name":278,"points":279,"category":280},"49567437","OpenTrailPaper",424,"hardware",{"id":282,"name":283,"points":284,"category":285},"49610059","Copperhead",250,"dev_tools",{"id":287,"name":288,"points":289,"category":285},"49562219","TERMy",225,{"id":291,"name":292,"points":293,"category":294},"49603546","Stuxnet",179,"security_privacy",{"id":296,"name":297,"points":298,"category":299},"49613068","LLM Attention Visualization",177,"ai",{"id":301,"name":302,"points":303,"category":304},"49568162","Jigsaw Haiku",118,"games",false,"v2",{"id":308,"name":5,"line":6,"ai":305,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":309,"top":18,"kw":310,"maker":11,"domain":10,"tier":19,"attempts":41,"strip":311,"url":9,"mix":312,"praise":70,"objection":86,"sub":21},49623398,-0.03,[24,25,26,27,28],"5030300500131053310000100300000000003033",[32,33,34,35],1793991166142]