[#118415] [Ruby master Bug#20601] Configuration flags are not properly propagated to assembler — "vo.x (Vit Ondruch) via ruby-core" <ruby-core@...>

Issue #20601 has been reported by vo.x (Vit Ondruch).

7 messages 2024/07/02

[#118467] [Ruby master Feature#20610] Float::INFINITY as IO.select timeout argument — "akr (Akira Tanaka) via ruby-core" <ruby-core@...>

Issue #20610 has been reported by akr (Akira Tanaka).

8 messages 2024/07/07

[#118483] [Ruby master Bug#20614] Integer#size returns incorrect values on 64-bit Windows — surusek via ruby-core <ruby-core@...>

SXNzdWUgIzIwNjE0IGhhcyBiZWVuIHJlcG9ydGVkIGJ5IHN1cnVzZWsgKMWBdWthc3ogU3VyKS4N

10 messages 2024/07/08

[#118577] [Ruby master Bug#20631] Build failure with Xcode 16 beta and macOS 15 (Sequoia) Beta — "hsbt (Hiroshi SHIBATA) via ruby-core" <ruby-core@...>

Issue #20631 has been reported by hsbt (Hiroshi SHIBATA).

9 messages 2024/07/12

[#118682] [Ruby master Misc#20652] Memory allocation for gsub has increased from Ruby 2.7 to 3.3 — "orisano (Nao Yonashiro) via ruby-core" <ruby-core@...>

Issue #20652 has been reported by orisano (Nao Yonashiro).

28 messages 2024/07/25

[ruby-core:118575] [Ruby master Bug#20604] Performance regression in C++ extensions due to lack of optimization flags by default since Ruby 2.7

From: "alanwu (Alan Wu) via ruby-core" <ruby-core@...>
Date: 2024-07-12 00:15:59 UTC
List: ruby-core #118575
Issue #20604 has been updated by alanwu (Alan Wu).


> Please specify $CXXFLAGS individually. 

Just some additional information about how to do this.
If you maintain a gem, you can add the desired flags to $CXXFLAGS in your `extconf.rb`.

As an user, you can install a gem while adding to $CXXFLAGS using `--with-cxxflags` without changing the gem. This is an `mkmf` feature. For example:

```
$ gem install sassc -- --with-cxxflags=-O3
```

----------------------------------------
Bug #20604: Performance regression in C++ extensions due to lack of optimization flags by default since Ruby 2.7
https://bugs.ruby-lang.org/issues/20604#change-109100

* Author: ntkme (Natsuki Natsume)
* Status: Rejected
* ruby -v: ruby 3.3.3 (2024-06-12 revision f1c7b6f435) [arm64-darwin23]
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
I found a significant performance regression in `sassc` gem when comparing Ruby 2.6 and later, that the extension is running more than 10x slower.

I have tracked it down to this commit: https://github.com/ruby/ruby/commit/733aa2f8b578d03bbcb91d2f496b01e3b990c7e8

This commit removed all default CXXFLAGS from RbConfig that were previously set, including `$optflags`, which has `-O3`.

Many of the C++ extensions like sassc use extconf/mkmf to compile, and they have assumed optflags are already set for CXXFLAGS. Without `-O3` as part of the default, the extensions are compiled without any optimizations and thus become extremely slow.

It is difficult for a regular user to find out the reason of the slowness, nor to say figuring out how to override CXXFLAGS for a native extension.

I'm not sure what was the reason of the change, but I think we should at least set `$optflags` in CXXFLAGS by default.



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- [email protected]
 To unsubscribe send an email to [email protected]
 ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/


In This Thread

Prev Next