β² 65 βΌ Despite 30 months work, core developer says Python's JIT compiler is often slower than the interpreter (devclass.com) submitted 1 year ago by cm0002@programming.dev to c/python@programming.dev 20 comments fedilink hide all child comments
[β] lime@feddit.nu 1 point 1 year ago (5 children) go is also not a fast language. it's about halfway between python and c. but they all solve different problems so that's ok. permalink fedilink source parent hideshow 5 child comments replies: [β] FizzyOrange@programming.dev 0 points 1 year ago (4 children) Absolute rubbish. Go is typically something like 2-3x slower than "native" languages like C and Rust. Python is typically 50-100x times slower. Go is much much closed to C than it is to Python. permalink fedilink source parent hideshow 4 child comments replies: [β] lime@feddit.nu 2 points 1 year ago* (3 children) not exactly: https://benchmarksgame-team.pages.debian.net/benchmarksgame/box-plot-summary-charts.html tl;dr it can be true, but not necessarily. fast python code is on the magnitude of 1/5th the speed of go. the thing with python is that there is a huge difference between fast and slow code. in go, only really slow code is slow, and in rust even slow code is fast. permalink fedilink source parent hideshow 3 child comments replies: [β] FizzyOrange@programming.dev -1 points 1 year ago (2 children) You shouldn't blindly trust those numbers. If you actually read the Python code a lot of them use ctypes to just delegate the work to C. It even says that at the bottom of the page. Seems like they've finally started calling these out - search for "contentious" on this page: https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/python3-go.html permalink fedilink source parent hideshow 2 child comments replies: [β] lime@feddit.nu 4 points 1 year ago (1 child) i mean, that's what you're supposed to do. python is a glue language, after all. permalink fedilink source parent hideshow 1 child comment replies: [β] FizzyOrange@programming.dev -3 points 1 year ago Nonsense. You are only "supposed" to do that because if you are using Python and you want performance you have no other choice! Reminds me of people saying you aren't "supposed" to store binaries in git - yeah only because git is so bad at it! When we were all using SVN people would have said "you aren't supposed to have multiple people editing the same file simultaneously" as if it were a fundamental truth. And Python isn't "a glue language". It's often used like that but there are many many pure Python projects. permalink fedilink source parent
[β] FizzyOrange@programming.dev 0 points 1 year ago (4 children) Absolute rubbish. Go is typically something like 2-3x slower than "native" languages like C and Rust. Python is typically 50-100x times slower. Go is much much closed to C than it is to Python. permalink fedilink source parent hideshow 4 child comments replies: [β] lime@feddit.nu 2 points 1 year ago* (3 children) not exactly: https://benchmarksgame-team.pages.debian.net/benchmarksgame/box-plot-summary-charts.html tl;dr it can be true, but not necessarily. fast python code is on the magnitude of 1/5th the speed of go. the thing with python is that there is a huge difference between fast and slow code. in go, only really slow code is slow, and in rust even slow code is fast. permalink fedilink source parent hideshow 3 child comments replies: [β] FizzyOrange@programming.dev -1 points 1 year ago (2 children) You shouldn't blindly trust those numbers. If you actually read the Python code a lot of them use ctypes to just delegate the work to C. It even says that at the bottom of the page. Seems like they've finally started calling these out - search for "contentious" on this page: https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/python3-go.html permalink fedilink source parent hideshow 2 child comments replies: [β] lime@feddit.nu 4 points 1 year ago (1 child) i mean, that's what you're supposed to do. python is a glue language, after all. permalink fedilink source parent hideshow 1 child comment replies: [β] FizzyOrange@programming.dev -3 points 1 year ago Nonsense. You are only "supposed" to do that because if you are using Python and you want performance you have no other choice! Reminds me of people saying you aren't "supposed" to store binaries in git - yeah only because git is so bad at it! When we were all using SVN people would have said "you aren't supposed to have multiple people editing the same file simultaneously" as if it were a fundamental truth. And Python isn't "a glue language". It's often used like that but there are many many pure Python projects. permalink fedilink source parent
[β] lime@feddit.nu 2 points 1 year ago* (3 children) not exactly: https://benchmarksgame-team.pages.debian.net/benchmarksgame/box-plot-summary-charts.html tl;dr it can be true, but not necessarily. fast python code is on the magnitude of 1/5th the speed of go. the thing with python is that there is a huge difference between fast and slow code. in go, only really slow code is slow, and in rust even slow code is fast. permalink fedilink source parent hideshow 3 child comments replies: [β] FizzyOrange@programming.dev -1 points 1 year ago (2 children) You shouldn't blindly trust those numbers. If you actually read the Python code a lot of them use ctypes to just delegate the work to C. It even says that at the bottom of the page. Seems like they've finally started calling these out - search for "contentious" on this page: https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/python3-go.html permalink fedilink source parent hideshow 2 child comments replies: [β] lime@feddit.nu 4 points 1 year ago (1 child) i mean, that's what you're supposed to do. python is a glue language, after all. permalink fedilink source parent hideshow 1 child comment replies: [β] FizzyOrange@programming.dev -3 points 1 year ago Nonsense. You are only "supposed" to do that because if you are using Python and you want performance you have no other choice! Reminds me of people saying you aren't "supposed" to store binaries in git - yeah only because git is so bad at it! When we were all using SVN people would have said "you aren't supposed to have multiple people editing the same file simultaneously" as if it were a fundamental truth. And Python isn't "a glue language". It's often used like that but there are many many pure Python projects. permalink fedilink source parent
[β] FizzyOrange@programming.dev -1 points 1 year ago (2 children) You shouldn't blindly trust those numbers. If you actually read the Python code a lot of them use ctypes to just delegate the work to C. It even says that at the bottom of the page. Seems like they've finally started calling these out - search for "contentious" on this page: https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/python3-go.html permalink fedilink source parent hideshow 2 child comments replies: [β] lime@feddit.nu 4 points 1 year ago (1 child) i mean, that's what you're supposed to do. python is a glue language, after all. permalink fedilink source parent hideshow 1 child comment replies: [β] FizzyOrange@programming.dev -3 points 1 year ago Nonsense. You are only "supposed" to do that because if you are using Python and you want performance you have no other choice! Reminds me of people saying you aren't "supposed" to store binaries in git - yeah only because git is so bad at it! When we were all using SVN people would have said "you aren't supposed to have multiple people editing the same file simultaneously" as if it were a fundamental truth. And Python isn't "a glue language". It's often used like that but there are many many pure Python projects. permalink fedilink source parent
[β] lime@feddit.nu 4 points 1 year ago (1 child) i mean, that's what you're supposed to do. python is a glue language, after all. permalink fedilink source parent hideshow 1 child comment replies: [β] FizzyOrange@programming.dev -3 points 1 year ago Nonsense. You are only "supposed" to do that because if you are using Python and you want performance you have no other choice! Reminds me of people saying you aren't "supposed" to store binaries in git - yeah only because git is so bad at it! When we were all using SVN people would have said "you aren't supposed to have multiple people editing the same file simultaneously" as if it were a fundamental truth. And Python isn't "a glue language". It's often used like that but there are many many pure Python projects. permalink fedilink source parent
[β] FizzyOrange@programming.dev -3 points 1 year ago Nonsense. You are only "supposed" to do that because if you are using Python and you want performance you have no other choice! Reminds me of people saying you aren't "supposed" to store binaries in git - yeah only because git is so bad at it! When we were all using SVN people would have said "you aren't supposed to have multiple people editing the same file simultaneously" as if it were a fundamental truth. And Python isn't "a glue language". It's often used like that but there are many many pure Python projects. permalink fedilink source parent